Add BleController to manage the BLE connection status
This commit is contained in:
parent
11aa5e3d88
commit
46eeefb53a
7 changed files with 48 additions and 6 deletions
11
src/Components/Ble/BleController.cpp
Normal file
11
src/Components/Ble/BleController.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "BleController.h"
|
||||
|
||||
using namespace Pinetime::Controllers;
|
||||
|
||||
void Ble::Connect() {
|
||||
isConnected = true;
|
||||
}
|
||||
|
||||
void Ble::Disconnect() {
|
||||
isConnected = false;
|
||||
}
|
||||
15
src/Components/Ble/BleController.h
Normal file
15
src/Components/Ble/BleController.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
class Ble {
|
||||
public:
|
||||
bool IsConnected() const {return isConnected;}
|
||||
void Connect();
|
||||
void Disconnect();
|
||||
|
||||
private:
|
||||
bool isConnected = false;
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue