319030d9e1
Implements 'Airplane mode' feature to disable and enable bluetooth/ble Adds airplaneMode as a non-persisted setting Adds a setting menu for switching airplane mode on and off Displays an airplane symbol on the Digital watch face and the PineTimeStyle watch face when airplane mode is enabled Always enables bluetooth/ble on boot (disable airplane mode) Alphabetizes the settings menu options Style cleanups Closes #632
28 lines
595 B
C++
28 lines
595 B
C++
#include "components/ble/BleController.h"
|
|
|
|
using namespace Pinetime::Controllers;
|
|
|
|
void Ble::SetConnectState(Ble::ConnectStates newState) {
|
|
connectionState = newState;
|
|
}
|
|
|
|
Ble::ConnectStates Ble::GetConnectState() const {
|
|
return connectionState;
|
|
}
|
|
|
|
void Ble::StartFirmwareUpdate() {
|
|
isFirmwareUpdating = true;
|
|
}
|
|
|
|
void Ble::StopFirmwareUpdate() {
|
|
isFirmwareUpdating = false;
|
|
}
|
|
|
|
void Ble::FirmwareUpdateTotalBytes(uint32_t totalBytes) {
|
|
firmwareUpdateTotalBytes = totalBytes;
|
|
}
|
|
|
|
void Ble::FirmwareUpdateCurrentBytes(uint32_t currentBytes) {
|
|
firmwareUpdateCurrentBytes = currentBytes;
|
|
}
|