From 319030d9e16e833cf8bff569a9ecfa452165ea27 Mon Sep 17 00:00:00 2001 From: "James A. Jerkins" Date: Thu, 23 Dec 2021 20:30:14 -0600 Subject: Add airplane mode feature 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 --- src/displayapp/screens/BleIcon.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/displayapp/screens/BleIcon.cpp') diff --git a/src/displayapp/screens/BleIcon.cpp b/src/displayapp/screens/BleIcon.cpp index 5058f3eb..a30d23bd 100644 --- a/src/displayapp/screens/BleIcon.cpp +++ b/src/displayapp/screens/BleIcon.cpp @@ -2,9 +2,11 @@ #include "displayapp/screens/Symbols.h" using namespace Pinetime::Applications::Screens; -const char* BleIcon::GetIcon(bool isConnected) { - if (isConnected) +const char* BleIcon::GetIcon(Pinetime::Controllers::Ble::ConnectStates state) { + if (state == Pinetime::Controllers::Ble::ConnectStates::Connected) return Symbols::bluetooth; + else if (state == Pinetime::Controllers::Ble::ConnectStates::Airplane) + return Symbols::airplane; else - return ""; -} \ No newline at end of file + return Symbols::none; +} -- cgit v1.2.3