Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
Apply a few changes that were requested in the PR during the review. # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
This commit is contained in:
parent
40cdb54772
commit
ef44b763d9
21 changed files with 179 additions and 124 deletions
|
|
@ -10,14 +10,15 @@ namespace Pinetime {
|
|||
using BleAddress = std::array<uint8_t, 6>;
|
||||
enum class FirmwareUpdateStates { Idle, Running, Validated, Error };
|
||||
enum class AddressTypes { Public, Random, RPA_Public, RPA_Random };
|
||||
enum class ConnectStates { Disconnected, Connected, Airplane };
|
||||
|
||||
Ble() = default;
|
||||
bool IsConnected() const {
|
||||
return (connectionState == ConnectStates::Connected);
|
||||
}
|
||||
void SetConnectState(ConnectStates newState);
|
||||
ConnectStates GetConnectState() const;
|
||||
bool IsConnected() const;
|
||||
void Connect();
|
||||
void Disconnect();
|
||||
|
||||
bool IsRadioEnabled() const;
|
||||
void EnableRadio();
|
||||
void DisableRadio();
|
||||
|
||||
void StartFirmwareUpdate();
|
||||
void StopFirmwareUpdate();
|
||||
|
|
@ -57,7 +58,8 @@ namespace Pinetime {
|
|||
}
|
||||
|
||||
private:
|
||||
ConnectStates connectionState = ConnectStates::Disconnected;
|
||||
bool isConnected = false;
|
||||
bool isRadioEnabled = true;
|
||||
bool isFirmwareUpdating = false;
|
||||
uint32_t firmwareUpdateTotalBytes = 0;
|
||||
uint32_t firmwareUpdateCurrentBytes = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue