diff options
author | Finlay Davidson <finlay.davidson@coderclass.nl> | 2022-05-09 17:16:08 +0200 |
---|---|---|
committer | Riku Isokoski <riksu9000@gmail.com> | 2022-06-05 09:15:46 +0300 |
commit | 7f45538eb53235ab4015fcf13533796c8759c7bc (patch) | |
tree | 79d9a2f60e8fb13cb5356bcc5c6e93259449530b /src/displayapp | |
parent | 718fbdab98ae80923a548ac03b7843f5d618a4f6 (diff) |
Apply clang-format to all C++ files
Diffstat (limited to 'src/displayapp')
36 files changed, 240 insertions, 176 deletions
diff --git a/src/displayapp/Colors.cpp b/src/displayapp/Colors.cpp index 2ac5fca2..106c5163 100644 --- a/src/displayapp/Colors.cpp +++ b/src/displayapp/Colors.cpp @@ -5,23 +5,41 @@ using namespace Pinetime::Controllers; lv_color_t Pinetime::Applications::Convert(Pinetime::Controllers::Settings::Colors color) { switch (color) { - case Pinetime::Controllers::Settings::Colors::White: return LV_COLOR_WHITE; - case Pinetime::Controllers::Settings::Colors::Silver: return LV_COLOR_SILVER; - case Pinetime::Controllers::Settings::Colors::Gray: return LV_COLOR_GRAY; - case Pinetime::Controllers::Settings::Colors::Black: return LV_COLOR_BLACK; - case Pinetime::Controllers::Settings::Colors::Red: return LV_COLOR_RED; - case Pinetime::Controllers::Settings::Colors::Maroon: return LV_COLOR_MAKE(0xb0, 0x0, 0x0); - case Pinetime::Controllers::Settings::Colors::Yellow: return LV_COLOR_YELLOW; - case Pinetime::Controllers::Settings::Colors::Olive: return LV_COLOR_MAKE(0xb0, 0xb0, 0x0); - case Pinetime::Controllers::Settings::Colors::Lime: return LV_COLOR_LIME; - case Pinetime::Controllers::Settings::Colors::Green: return LV_COLOR_MAKE(0x0, 0xb0, 0x0); - case Pinetime::Controllers::Settings::Colors::Cyan: return LV_COLOR_CYAN; - case Pinetime::Controllers::Settings::Colors::Teal: return LV_COLOR_MAKE(0x0, 0xb0, 0xb0); - case Pinetime::Controllers::Settings::Colors::Blue: return LV_COLOR_BLUE; - case Pinetime::Controllers::Settings::Colors::Navy: return LV_COLOR_MAKE(0x0, 0x0, 0xb0); - case Pinetime::Controllers::Settings::Colors::Magenta: return LV_COLOR_MAGENTA; - case Pinetime::Controllers::Settings::Colors::Purple: return LV_COLOR_MAKE(0xb0, 0x0, 0xb0); - case Pinetime::Controllers::Settings::Colors::Orange: return LV_COLOR_ORANGE; - default: return LV_COLOR_WHITE; + case Pinetime::Controllers::Settings::Colors::White: + return LV_COLOR_WHITE; + case Pinetime::Controllers::Settings::Colors::Silver: + return LV_COLOR_SILVER; + case Pinetime::Controllers::Settings::Colors::Gray: + return LV_COLOR_GRAY; + case Pinetime::Controllers::Settings::Colors::Black: + return LV_COLOR_BLACK; + case Pinetime::Controllers::Settings::Colors::Red: + return LV_COLOR_RED; + case Pinetime::Controllers::Settings::Colors::Maroon: + return LV_COLOR_MAKE(0xb0, 0x0, 0x0); + case Pinetime::Controllers::Settings::Colors::Yellow: + return LV_COLOR_YELLOW; + case Pinetime::Controllers::Settings::Colors::Olive: + return LV_COLOR_MAKE(0xb0, 0xb0, 0x0); + case Pinetime::Controllers::Settings::Colors::Lime: + return LV_COLOR_LIME; + case Pinetime::Controllers::Settings::Colors::Green: + return LV_COLOR_MAKE(0x0, 0xb0, 0x0); + case Pinetime::Controllers::Settings::Colors::Cyan: + return LV_COLOR_CYAN; + case Pinetime::Controllers::Settings::Colors::Teal: + return LV_COLOR_MAKE(0x0, 0xb0, 0xb0); + case Pinetime::Controllers::Settings::Colors::Blue: + return LV_COLOR_BLUE; + case Pinetime::Controllers::Settings::Colors::Navy: + return LV_COLOR_MAKE(0x0, 0x0, 0xb0); + case Pinetime::Controllers::Settings::Colors::Magenta: + return LV_COLOR_MAGENTA; + case Pinetime::Controllers::Settings::Colors::Purple: + return LV_COLOR_MAKE(0xb0, 0x0, 0xb0); + case Pinetime::Controllers::Settings::Colors::Orange: + return LV_COLOR_ORANGE; + default: + return LV_COLOR_WHITE; } } diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index bd5412ea..a50f6766 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -348,13 +348,21 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) break; case Apps::Notifications: - currentScreen = std::make_unique<Screens::Notifications>( - this, notificationManager, systemTask->nimble().alertService(), motorController, *systemTask, Screens::Notifications::Modes::Normal); + currentScreen = std::make_unique<Screens::Notifications>(this, + notificationManager, + systemTask->nimble().alertService(), + motorController, + *systemTask, + Screens::Notifications::Modes::Normal); ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp); break; case Apps::NotificationsPreview: - currentScreen = std::make_unique<Screens::Notifications>( - this, notificationManager, systemTask->nimble().alertService(), motorController, *systemTask, Screens::Notifications::Modes::Preview); + currentScreen = std::make_unique<Screens::Notifications>(this, + notificationManager, + systemTask->nimble().alertService(), + motorController, + *systemTask, + Screens::Notifications::Modes::Preview); ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp); break; case Apps::Timer: @@ -366,8 +374,12 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) // Settings case Apps::QuickSettings: - currentScreen = std::make_unique<Screens::QuickSettings>( - this, batteryController, dateTimeController, brightnessController, motorController, settingsController); + currentScreen = std::make_unique<Screens::QuickSettings>(this, + batteryController, + dateTimeController, + brightnessController, + motorController, + settingsController); ReturnApp(Apps::Clock, FullRefreshDirections::LeftAnim, TouchEvents::SwipeLeft); break; case Apps::Settings: @@ -419,8 +431,14 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; case Apps::SysInfo: - currentScreen = std::make_unique<Screens::SystemInfo>( - this, dateTimeController, batteryController, brightnessController, bleController, watchdog, motionController, touchPanel); + currentScreen = std::make_unique<Screens::SystemInfo>(this, + dateTimeController, + batteryController, + brightnessController, + bleController, + watchdog, + motionController, + touchPanel); ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown); break; case Apps::FlashLight: diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index 1eaefaa1..43972232 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -88,7 +88,7 @@ namespace Pinetime { Pinetime::Controllers::MotionController& motionController; Pinetime::Controllers::TimerController& timerController; Pinetime::Controllers::AlarmController& alarmController; - Pinetime::Controllers::BrightnessController &brightnessController; + Pinetime::Controllers::BrightnessController& brightnessController; Pinetime::Controllers::TouchHandler& touchHandler; Pinetime::Controllers::FirmwareValidator validator; diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp index 9d6eb22f..ca15dbaf 100644 --- a/src/displayapp/DisplayAppRecovery.cpp +++ b/src/displayapp/DisplayAppRecovery.cpp @@ -26,7 +26,6 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, Pinetime::Controllers::BrightnessController& brightnessController, Pinetime::Controllers::TouchHandler& touchHandler) : lcd {lcd}, bleController {bleController} { - } void DisplayApp::Start() { @@ -121,5 +120,4 @@ void DisplayApp::PushMessage(Display::Messages msg) { } void DisplayApp::Register(Pinetime::System::SystemTask* systemTask) { - } diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h index 61f1c9bf..0e801221 100644 --- a/src/displayapp/DisplayAppRecovery.h +++ b/src/displayapp/DisplayAppRecovery.h @@ -61,7 +61,9 @@ namespace Pinetime { Pinetime::Controllers::BrightnessController& brightnessController, Pinetime::Controllers::TouchHandler& touchHandler); void Start(); - void Start(Pinetime::System::BootErrors){ Start(); }; + void Start(Pinetime::System::BootErrors) { + Start(); + }; void PushMessage(Pinetime::Applications::Display::Messages msg); void Register(Pinetime::System::SystemTask* systemTask); diff --git a/src/displayapp/DummyLittleVgl.h b/src/displayapp/DummyLittleVgl.h index 47c9e021..05355a97 100644 --- a/src/displayapp/DummyLittleVgl.h +++ b/src/displayapp/DummyLittleVgl.h @@ -20,7 +20,6 @@ namespace Pinetime { LittleVgl& operator=(LittleVgl&&) = delete; void Init() { - } void FlushDisplay(const lv_area_t* area, lv_color_t* color_p) { @@ -33,7 +32,6 @@ namespace Pinetime { void SetNewTapEvent(uint16_t x, uint16_t y) { } void SetNewTouchPoint(uint16_t x, uint16_t y, bool contact) { - } }; } diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp index 25f35917..f401f524 100644 --- a/src/displayapp/LittleVgl.cpp +++ b/src/displayapp/LittleVgl.cpp @@ -195,8 +195,13 @@ bool LittleVgl::GetTouchPadInfo(lv_indev_data_t* ptr) { void LittleVgl::InitTheme() { - lv_theme_t* th = lv_pinetime_theme_init( - LV_COLOR_WHITE, LV_COLOR_SILVER, 0, &jetbrains_mono_bold_20, &jetbrains_mono_bold_20, &jetbrains_mono_bold_20, &jetbrains_mono_bold_20); + lv_theme_t* th = lv_pinetime_theme_init(LV_COLOR_WHITE, + LV_COLOR_SILVER, + 0, + &jetbrains_mono_bold_20, + &jetbrains_mono_bold_20, + &jetbrains_mono_bold_20, + &jetbrains_mono_bold_20); lv_theme_set_act(th); } diff --git a/src/displayapp/screens/Alarm.cpp b/src/displayapp/screens/Alarm.cpp index 39592056..c1ee6469 100644 --- a/src/displayapp/screens/Alarm.cpp +++ b/src/displayapp/screens/Alarm.cpp @@ -300,8 +300,12 @@ void Alarm::ShowInfo() { auto minToAlarm = (timeToAlarm % 3600) / 60; auto secToAlarm = timeToAlarm % 60; - lv_label_set_text_fmt( - txtMessage, "Time to\nalarm:\n%2lu Days\n%2lu Hours\n%2lu Minutes\n%2lu Seconds", daysToAlarm, hrsToAlarm, minToAlarm, secToAlarm); + lv_label_set_text_fmt(txtMessage, + "Time to\nalarm:\n%2lu Days\n%2lu Hours\n%2lu Minutes\n%2lu Seconds", + daysToAlarm, + hrsToAlarm, + minToAlarm, + secToAlarm); } else { lv_label_set_text_static(txtMessage, "Alarm\nis not\nset."); } diff --git a/src/displayapp/screens/Alarm.h b/src/displayapp/screens/Alarm.h index f74dd68e..80e446f1 100644 --- a/src/displayapp/screens/Alarm.h +++ b/src/displayapp/screens/Alarm.h @@ -45,8 +45,8 @@ namespace Pinetime { Controllers::Settings& settingsController; System::SystemTask& systemTask; - lv_obj_t *time, *lblampm, *btnStop, *txtStop, *btnMinutesUp, *btnMinutesDown, *btnHoursUp, *btnHoursDown, *txtMinUp, - *txtMinDown, *txtHrUp, *txtHrDown, *btnRecur, *txtRecur, *btnInfo, *txtInfo, *enableSwitch; + lv_obj_t *time, *lblampm, *btnStop, *txtStop, *btnMinutesUp, *btnMinutesDown, *btnHoursUp, *btnHoursDown, *txtMinUp, *txtMinDown, + *txtHrUp, *txtHrDown, *btnRecur, *txtRecur, *btnInfo, *txtInfo, *enableSwitch; lv_obj_t* txtMessage = nullptr; lv_obj_t* btnMessage = nullptr; lv_task_t* taskStopAlarm = nullptr; diff --git a/src/displayapp/screens/BatteryIcon.h b/src/displayapp/screens/BatteryIcon.h index 81f94ac4..45d8f0ef 100644 --- a/src/displayapp/screens/BatteryIcon.h +++ b/src/displayapp/screens/BatteryIcon.h @@ -15,6 +15,7 @@ namespace Pinetime { static const char* GetUnknownIcon(); static const char* GetPlugIcon(bool isCharging); + private: lv_obj_t* batteryImg; lv_obj_t* batteryJuice; diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp index 693e42a9..1687dccf 100644 --- a/src/displayapp/screens/Clock.cpp +++ b/src/displayapp/screens/Clock.cpp @@ -75,13 +75,22 @@ std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() { } std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() { - return std::make_unique<Screens::WatchFaceAnalog>( - app, dateTimeController, batteryController, bleController, notificatioManager, settingsController); + return std::make_unique<Screens::WatchFaceAnalog>(app, + dateTimeController, + batteryController, + bleController, + notificatioManager, + settingsController); } std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() { - return std::make_unique<Screens::WatchFacePineTimeStyle>( - app, dateTimeController, batteryController, bleController, notificatioManager, settingsController, motionController); + return std::make_unique<Screens::WatchFacePineTimeStyle>(app, + dateTimeController, + batteryController, + bleController, + notificatioManager, + settingsController, + motionController); } std::unique_ptr<Screen> Clock::WatchFaceTerminalScreen() { diff --git a/src/displayapp/screens/Error.cpp b/src/displayapp/screens/Error.cpp index 1dbc3447..1f2c61d6 100644 --- a/src/displayapp/screens/Error.cpp +++ b/src/displayapp/screens/Error.cpp @@ -9,8 +9,7 @@ namespace { } } -Error::Error(Pinetime::Applications::DisplayApp* app, System::BootErrors error) - : Screen(app) { +Error::Error(Pinetime::Applications::DisplayApp* app, System::BootErrors error) : Screen(app) { lv_obj_t* warningLabel = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(warningLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE); diff --git a/src/displayapp/screens/Error.h b/src/displayapp/screens/Error.h index 23167545..6dbcc38b 100644 --- a/src/displayapp/screens/Error.h +++ b/src/displayapp/screens/Error.h @@ -13,6 +13,7 @@ namespace Pinetime { ~Error() override; void ButtonEventHandler(); + private: lv_obj_t* btnOk; }; diff --git a/src/displayapp/screens/FirmwareValidation.cpp b/src/displayapp/screens/FirmwareValidation.cpp index 52ff954e..a3c97616 100644 --- a/src/displayapp/screens/FirmwareValidation.cpp +++ b/src/displayapp/screens/FirmwareValidation.cpp @@ -34,7 +34,8 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, if (validator.IsValidated()) lv_label_set_text_static(labelIsValidated, "You have already\n#00ff00 validated# this firmware#"); else { - lv_label_set_text_static(labelIsValidated, "Please #00ff00 Validate# this version or\n#ff0000 Reset# to rollback to the previous version."); + lv_label_set_text_static(labelIsValidated, + "Please #00ff00 Validate# this version or\n#ff0000 Reset# to rollback to the previous version."); buttonValidate = lv_btn_create(lv_scr_act(), nullptr); buttonValidate->user_data = this; diff --git a/src/displayapp/screens/FlashLight.cpp b/src/displayapp/screens/FlashLight.cpp index bef15d02..2a1884f6 100644 --- a/src/displayapp/screens/FlashLight.cpp +++ b/src/displayapp/screens/FlashLight.cpp @@ -28,7 +28,7 @@ FlashLight::FlashLight(Pinetime::Applications::DisplayApp* app, lv_label_set_text_static(flashLight, Symbols::highlight); lv_obj_align(flashLight, nullptr, LV_ALIGN_CENTER, 0, 0); - for (auto & i : indicators) { + for (auto& i : indicators) { i = lv_obj_create(lv_scr_act(), nullptr); lv_obj_set_size(i, 15, 10); lv_obj_set_style_local_border_width(i, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, 2); @@ -64,7 +64,7 @@ void FlashLight::SetColors() { if (isOn) { lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); lv_obj_set_style_local_text_color(flashLight, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0)); - for (auto & i : indicators) { + for (auto& i : indicators) { lv_obj_set_style_local_bg_color(i, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0)); lv_obj_set_style_local_bg_color(i, LV_OBJ_PART_MAIN, LV_STATE_DISABLED, LV_COLOR_WHITE); lv_obj_set_style_local_border_color(i, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0)); @@ -72,7 +72,7 @@ void FlashLight::SetColors() { } else { lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK); lv_obj_set_style_local_text_color(flashLight, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); - for (auto & i : indicators) { + for (auto& i : indicators) { lv_obj_set_style_local_bg_color(i, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); lv_obj_set_style_local_bg_color(i, LV_OBJ_PART_MAIN, LV_STATE_DISABLED, LV_COLOR_BLACK); lv_obj_set_style_local_border_color(i, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); diff --git a/src/displayapp/screens/Metronome.h b/src/displayapp/screens/Metronome.h index 6e6589fe..8933b17e 100644 --- a/src/displayapp/screens/Metronome.h +++ b/src/displayapp/screens/Metronome.h @@ -30,7 +30,7 @@ namespace Pinetime { lv_obj_t *bpmArc, *bpmTap, *bpmValue; lv_obj_t *bpbDropdown, *currentBpbText; - lv_obj_t *playPause; + lv_obj_t* playPause; lv_task_t* taskRefresh; }; diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index 8bba8ce6..d7fe93a0 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -198,12 +198,12 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_obj_t* alert_type = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(alert_type, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0)); - if(title == nullptr) { + if (title == nullptr) { lv_label_set_text_static(alert_type, "Notification"); } else { // copy title to label and replace newlines with spaces lv_label_set_text(alert_type, title); - char *pchar = strchr(lv_label_get_text(alert_type), '\n'); + char* pchar = strchr(lv_label_get_text(alert_type), '\n'); while (pchar != nullptr) { *pchar = ' '; pchar = strchr(pchar + 1, '\n'); diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp index 2865db08..1fb25085 100644 --- a/src/displayapp/screens/Paddle.cpp +++ b/src/displayapp/screens/Paddle.cpp @@ -53,7 +53,7 @@ void Paddle::Refresh() { if (ballX >= LV_HOR_RES - ballSize - 1) { dx *= -1; dy += rand() % 3 - 1; // add a little randomization in wall bounce direction, one of [-1, 0, 1] - if (dy > 5) { // limit dy to be in range [-5 to 5] + if (dy > 5) { // limit dy to be in range [-5 to 5] dy = 5; } if (dy < -5) { diff --git a/src/displayapp/screens/PassKey.cpp b/src/displayapp/screens/PassKey.cpp index 13cdcc25..4057a7eb 100644 --- a/src/displayapp/screens/PassKey.cpp +++ b/src/displayapp/screens/PassKey.cpp @@ -14,4 +14,3 @@ PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) : Screen PassKey::~PassKey() { lv_obj_clean(lv_scr_act()); } - diff --git a/src/displayapp/screens/ScreenList.h b/src/displayapp/screens/ScreenList.h index e316e360..ad882948 100644 --- a/src/displayapp/screens/ScreenList.h +++ b/src/displayapp/screens/ScreenList.h @@ -17,8 +17,12 @@ namespace Pinetime { uint8_t initScreen, const std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens, ScreenListModes mode) - : Screen(app), initScreen {initScreen}, screens {std::move(screens)}, mode {mode}, screenIndex{initScreen}, current {this->screens[initScreen]()} { - + : Screen(app), + initScreen {initScreen}, + screens {std::move(screens)}, + mode {mode}, + screenIndex {initScreen}, + current {this->screens[initScreen]()} { } ScreenList(const ScreenList&) = delete; diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp index 6899567c..d0db59c0 100644 --- a/src/displayapp/screens/StopWatch.cpp +++ b/src/displayapp/screens/StopWatch.cpp @@ -166,8 +166,12 @@ void StopWatch::stopLapBtnEventHandler(lv_event_t event) { lapBuffer.addLaps(currentTimeSeparated); lapNr++; if (lapBuffer[1]) { - lv_label_set_text_fmt( - lapOneText, "#%2d %2d:%02d.%02d", (lapNr - 1), lapBuffer[1]->mins, lapBuffer[1]->secs, lapBuffer[1]->hundredths); + lv_label_set_text_fmt(lapOneText, + "#%2d %2d:%02d.%02d", + (lapNr - 1), + lapBuffer[1]->mins, + lapBuffer[1]->secs, + lapBuffer[1]->hundredths); } if (lapBuffer[0]) { lv_label_set_text_fmt(lapTwoText, "#%2d %2d:%02d.%02d", lapNr, lapBuffer[0]->mins, lapBuffer[0]->secs, lapBuffer[0]->hundredths); diff --git a/src/displayapp/screens/Tile.cpp b/src/displayapp/screens/Tile.cpp index e90c7535..cce1d2ed 100644 --- a/src/displayapp/screens/Tile.cpp +++ b/src/displayapp/screens/Tile.cpp @@ -120,7 +120,8 @@ void Tile::UpdateScreen() { } void Tile::OnValueChangedEvent(lv_obj_t* obj, uint32_t buttonId) { - if(obj != btnm1) return; + if (obj != btnm1) + return; app->StartApp(apps[buttonId], DisplayApp::FullRefreshDirections::Up); running = false; diff --git a/src/displayapp/screens/WatchFaceAnalog.cpp b/src/displayapp/screens/WatchFaceAnalog.cpp index dd5b2929..251a560f 100644 --- a/src/displayapp/screens/WatchFaceAnalog.cpp +++ b/src/displayapp/screens/WatchFaceAnalog.cpp @@ -12,35 +12,33 @@ LV_IMG_DECLARE(bg_clock); using namespace Pinetime::Applications::Screens; namespace { -constexpr int16_t HourLength = 70; -constexpr int16_t MinuteLength = 90; -constexpr int16_t SecondLength = 110; + constexpr int16_t HourLength = 70; + constexpr int16_t MinuteLength = 90; + constexpr int16_t SecondLength = 110; -// sin(90) = 1 so the value of _lv_trigo_sin(90) is the scaling factor -const auto LV_TRIG_SCALE = _lv_trigo_sin(90); + // sin(90) = 1 so the value of _lv_trigo_sin(90) is the scaling factor + const auto LV_TRIG_SCALE = _lv_trigo_sin(90); -int16_t Cosine(int16_t angle) { - return _lv_trigo_sin(angle + 90); -} + int16_t Cosine(int16_t angle) { + return _lv_trigo_sin(angle + 90); + } -int16_t Sine(int16_t angle) { - return _lv_trigo_sin(angle); -} + int16_t Sine(int16_t angle) { + return _lv_trigo_sin(angle); + } -int16_t CoordinateXRelocate(int16_t x) { - return (x + LV_HOR_RES / 2); -} + int16_t CoordinateXRelocate(int16_t x) { + return (x + LV_HOR_RES / 2); + } -int16_t CoordinateYRelocate(int16_t y) { - return std::abs(y - LV_HOR_RES / 2); -} + int16_t CoordinateYRelocate(int16_t y) { + return std::abs(y - LV_HOR_RES / 2); + } -lv_point_t CoordinateRelocate(int16_t radius, int16_t angle) { - return lv_point_t{ - .x = CoordinateXRelocate(radius * static_cast<int32_t>(Sine(angle)) / LV_TRIG_SCALE), - .y = CoordinateYRelocate(radius * static_cast<int32_t>(Cosine(angle)) / LV_TRIG_SCALE) - }; -} + lv_point_t CoordinateRelocate(int16_t radius, int16_t angle) { + return lv_point_t {.x = CoordinateXRelocate(radius * static_cast<int32_t>(Sine(angle)) / LV_TRIG_SCALE), + .y = CoordinateYRelocate(radius * static_cast<int32_t>(Cosine(angle)) / LV_TRIG_SCALE)}; + } } diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index 1df38255..d10f8532 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -160,11 +160,19 @@ void WatchFaceDigital::Refresh() { if ((year != currentYear) || (month != currentMonth) || (dayOfWeek != currentDayOfWeek) || (day != currentDay)) { if (settingsController.GetClockType() == Controllers::Settings::ClockType::H24) { - lv_label_set_text_fmt( - label_date, "%s %d %s %d", dateTimeController.DayOfWeekShortToString(), day, dateTimeController.MonthShortToString(), year); + lv_label_set_text_fmt(label_date, + "%s %d %s %d", + dateTimeController.DayOfWeekShortToString(), + day, + dateTimeController.MonthShortToString(), + year); } else { - lv_label_set_text_fmt( - label_date, "%s %s %d %d", dateTimeController.DayOfWeekShortToString(), dateTimeController.MonthShortToString(), day, year); + lv_label_set_text_fmt(label_date, + "%s %s %d %d", + dateTimeController.DayOfWeekShortToString(), + dateTimeController.MonthShortToString(), + day, + year); } lv_obj_realign(label_date); diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp index a7772417..dad2f4c7 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp +++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp @@ -44,7 +44,7 @@ namespace { } bool IsBleIconVisible(bool isRadioEnabled, bool isConnected) { - if(!isRadioEnabled) { + if (!isRadioEnabled) { return true; } return isConnected; @@ -52,12 +52,12 @@ namespace { } WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app, - Controllers::DateTime& dateTimeController, - Controllers::Battery& batteryController, - Controllers::Ble& bleController, - Controllers::NotificationManager& notificatioManager, - Controllers::Settings& settingsController, - Controllers::MotionController& motionController) + Controllers::DateTime& dateTimeController, + Controllers::Battery& batteryController, + Controllers::Ble& bleController, + Controllers::NotificationManager& notificatioManager, + Controllers::Settings& settingsController, + Controllers::MotionController& motionController) : Screen(app), currentDateTime {{}}, dateTimeController {dateTimeController}, diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.h b/src/displayapp/screens/WatchFacePineTimeStyle.h index cfabc2c7..6f44f943 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.h +++ b/src/displayapp/screens/WatchFacePineTimeStyle.h @@ -25,12 +25,12 @@ namespace Pinetime { class WatchFacePineTimeStyle : public Screen { public: WatchFacePineTimeStyle(DisplayApp* app, - Controllers::DateTime& dateTimeController, - Controllers::Battery& batteryController, - Controllers::Ble& bleController, - Controllers::NotificationManager& notificatioManager, - Controllers::Settings& settingsController, - Controllers::MotionController& motionController); + Controllers::DateTime& dateTimeController, + Controllers::Battery& batteryController, + Controllers::Ble& bleController, + Controllers::NotificationManager& notificatioManager, + Controllers::Settings& settingsController, + Controllers::MotionController& motionController); ~WatchFacePineTimeStyle() override; bool OnTouchEvent(TouchEvents event) override; @@ -38,7 +38,7 @@ namespace Pinetime { void Refresh() override; - void UpdateSelected(lv_obj_t *object, lv_event_t event); + void UpdateSelected(lv_obj_t* object, lv_event_t event); private: uint8_t displayedHour = -1; diff --git a/src/displayapp/screens/WatchFaceTerminal.cpp b/src/displayapp/screens/WatchFaceTerminal.cpp index 80d736cf..c899648c 100644 --- a/src/displayapp/screens/WatchFaceTerminal.cpp +++ b/src/displayapp/screens/WatchFaceTerminal.cpp @@ -89,7 +89,7 @@ void WatchFaceTerminal::Refresh() { bleState = bleController.IsConnected(); bleRadioEnabled = bleController.IsRadioEnabled(); if (bleState.IsUpdated() || bleRadioEnabled.IsUpdated()) { - if(!bleRadioEnabled.Get()) { + if (!bleRadioEnabled.Get()) { lv_label_set_text_static(connectState, "[STAT]#0082fc Disabled#"); } else { if (bleState.Get()) { diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp index fe8f3cb4..708d5109 100644 --- a/src/displayapp/screens/settings/QuickSettings.cpp +++ b/src/displayapp/screens/settings/QuickSettings.cpp @@ -44,7 +44,7 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app, static constexpr uint8_t barHeight = 20 + innerDistance; static constexpr uint8_t buttonHeight = (LV_VER_RES_MAX - barHeight - innerDistance) / 2; static constexpr uint8_t buttonWidth = (LV_HOR_RES_MAX - innerDistance) / 2; // wide buttons - //static constexpr uint8_t buttonWidth = buttonHeight; // square buttons + // static constexpr uint8_t buttonWidth = buttonHeight; // square buttons static constexpr uint8_t buttonXOffset = (LV_HOR_RES_MAX - buttonWidth * 2 - innerDistance) / 2; lv_style_init(&btn_style); @@ -67,7 +67,7 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app, lv_obj_set_event_cb(btn2, ButtonEventHandler); lv_obj_add_style(btn2, LV_BTN_PART_MAIN, &btn_style); lv_obj_set_size(btn2, buttonWidth, buttonHeight); - lv_obj_align(btn2, nullptr, LV_ALIGN_IN_TOP_RIGHT, - buttonXOffset, barHeight); + lv_obj_align(btn2, nullptr, LV_ALIGN_IN_TOP_RIGHT, -buttonXOffset, barHeight); lv_obj_t* lbl_btn; lbl_btn = lv_label_create(btn2, nullptr); @@ -98,7 +98,7 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app, lv_obj_set_event_cb(btn4, ButtonEventHandler); lv_obj_add_style(btn4, LV_BTN_PART_MAIN, &btn_style); lv_obj_set_size(btn4, buttonWidth, buttonHeight); - lv_obj_align(btn4, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, - buttonXOffset, 0); + lv_obj_align(btn4, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, -buttonXOffset, 0); lbl_btn = lv_label_create(btn4, nullptr); lv_obj_set_style_local_text_font(lbl_btn, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_sys_48); diff --git a/src/displayapp/screens/settings/SettingBluetooth.cpp b/src/displayapp/screens/settings/SettingBluetooth.cpp index 2fc5d95c..c66be3e9 100644 --- a/src/displayapp/screens/settings/SettingBluetooth.cpp +++ b/src/displayapp/screens/settings/SettingBluetooth.cpp @@ -90,4 +90,3 @@ void SettingBluetooth::OnBluetoothEnabled(lv_obj_t* object, lv_event_t event) { settingsController.SetBleRadioEnabled(true); } } - diff --git a/src/displayapp/screens/settings/SettingDisplay.cpp b/src/displayapp/screens/settings/SettingDisplay.cpp index 229143f7..bf2087ab 100644 --- a/src/displayapp/screens/settings/SettingDisplay.cpp +++ b/src/displayapp/screens/settings/SettingDisplay.cpp @@ -46,7 +46,7 @@ SettingDisplay::SettingDisplay(Pinetime::Applications::DisplayApp* app, Pinetime char buffer[12]; for (unsigned int i = 0; i < options.size(); i++) { cbOption[i] = lv_checkbox_create(container1, nullptr); - sprintf(buffer, "%3d seconds", options[i] / 1000); + sprintf(buffer, "%3d seconds", options[i] / 1000); lv_checkbox_set_text(cbOption[i], buffer); cbOption[i]->user_data = this; lv_obj_set_event_cb(cbOption[i], event_handler); diff --git a/src/displayapp/screens/settings/SettingSetDate.cpp b/src/displayapp/screens/settings/SettingSetDate.cpp index 8bfded34..7acf0c19 100644 --- a/src/displayapp/screens/settings/SettingSetDate.cpp +++ b/src/displayapp/screens/settings/SettingSetDate.cpp @@ -15,23 +15,22 @@ namespace { constexpr int16_t POS_Y_TEXT = -6; constexpr int16_t POS_Y_MINUS = 40; - void event_handler(lv_obj_t * obj, lv_event_t event) { - auto* screen = static_cast<SettingSetDate *>(obj->user_data); + void event_handler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast<SettingSetDate*>(obj->user_data); screen->HandleButtonPress(obj, event); } } -SettingSetDate::SettingSetDate(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::DateTime &dateTimeController) : - Screen(app), - dateTimeController {dateTimeController} { - lv_obj_t * title = lv_label_create(lv_scr_act(), nullptr); +SettingSetDate::SettingSetDate(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::DateTime& dateTimeController) + : Screen(app), dateTimeController {dateTimeController} { + lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr); lv_label_set_text_static(title, "Set current date"); lv_label_set_align(title, LV_LABEL_ALIGN_CENTER); lv_obj_align(title, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 15, 15); - lv_obj_t * icon = lv_label_create(lv_scr_act(), nullptr); + lv_obj_t* icon = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE); - + lv_label_set_text_static(icon, Symbols::clock); lv_label_set_align(icon, LV_LABEL_ALIGN_CENTER); lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0); @@ -113,7 +112,7 @@ SettingSetDate::~SettingSetDate() { lv_obj_clean(lv_scr_act()); } -void SettingSetDate::HandleButtonPress(lv_obj_t *object, lv_event_t event) { +void SettingSetDate::HandleButtonPress(lv_obj_t* object, lv_event_t event) { if (event != LV_EVENT_CLICKED) return; @@ -194,5 +193,6 @@ void SettingSetDate::CheckDay() { void SettingSetDate::UpdateMonthLabel() { lv_label_set_text_static( - lblMonth, Pinetime::Controllers::DateTime::MonthShortToStringLow(static_cast<Pinetime::Controllers::DateTime::Months>(monthValue))); + lblMonth, + Pinetime::Controllers::DateTime::MonthShortToStringLow(static_cast<Pinetime::Controllers::DateTime::Months>(monthValue))); } diff --git a/src/displayapp/screens/settings/SettingSetDate.h b/src/displayapp/screens/settings/SettingSetDate.h index 477337ff..a1795942 100644 --- a/src/displayapp/screens/settings/SettingSetDate.h +++ b/src/displayapp/screens/settings/SettingSetDate.h @@ -8,33 +8,33 @@ namespace Pinetime { namespace Applications { namespace Screens { - class SettingSetDate : public Screen{ - public: - SettingSetDate(DisplayApp* app, Pinetime::Controllers::DateTime &dateTimeController); - ~SettingSetDate() override; + class SettingSetDate : public Screen { + public: + SettingSetDate(DisplayApp* app, Pinetime::Controllers::DateTime& dateTimeController); + ~SettingSetDate() override; - void HandleButtonPress(lv_obj_t *object, lv_event_t event); - - private: - Controllers::DateTime& dateTimeController; + void HandleButtonPress(lv_obj_t* object, lv_event_t event); - int dayValue; - int monthValue; - int yearValue; - lv_obj_t * lblDay; - lv_obj_t * lblMonth; - lv_obj_t * lblYear; - lv_obj_t * btnDayPlus; - lv_obj_t * btnDayMinus; - lv_obj_t * btnMonthPlus; - lv_obj_t * btnMonthMinus; - lv_obj_t * btnYearPlus; - lv_obj_t * btnYearMinus; - lv_obj_t * btnSetTime; + private: + Controllers::DateTime& dateTimeController; - int MaximumDayOfMonth() const; - void CheckDay(); - void UpdateMonthLabel(); + int dayValue; + int monthValue; + int yearValue; + lv_obj_t* lblDay; + lv_obj_t* lblMonth; + lv_obj_t* lblYear; + lv_obj_t* btnDayPlus; + lv_obj_t* btnDayMinus; + lv_obj_t* btnMonthPlus; + lv_obj_t* btnMonthMinus; + lv_obj_t* btnYearPlus; + lv_obj_t* btnYearMinus; + lv_obj_t* btnSetTime; + + int MaximumDayOfMonth() const; + void CheckDay(); + void UpdateMonthLabel(); }; } } diff --git a/src/displayapp/screens/settings/SettingShakeThreshold.cpp b/src/displayapp/screens/settings/SettingShakeThreshold.cpp index 0cf5821c..aac1eaff 100644 --- a/src/displayapp/screens/settings/SettingShakeThreshold.cpp +++ b/src/displayapp/screens/settings/SettingShakeThreshold.cpp @@ -64,9 +64,9 @@ SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app, vDecay = xTaskGetTickCount(); calibrating = false; EnableForCal = false; - if(!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)){ + if (!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)) { EnableForCal = true; - settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake,true); + settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake, true); } refreshTask = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } @@ -74,8 +74,8 @@ SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app, SettingShakeThreshold::~SettingShakeThreshold() { settingsController.SetShakeThreshold(lv_arc_get_value(positionArc)); - if(EnableForCal){ - settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake,false); + if (EnableForCal) { + settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake, false); EnableForCal = false; } lv_task_del(refreshTask); diff --git a/src/displayapp/screens/settings/SettingShakeThreshold.h b/src/displayapp/screens/settings/SettingShakeThreshold.h index 37f4a65e..43319468 100644 --- a/src/displayapp/screens/settings/SettingShakeThreshold.h +++ b/src/displayapp/screens/settings/SettingShakeThreshold.h @@ -28,8 +28,8 @@ namespace Pinetime { System::SystemTask& systemTask; uint8_t calibrating; bool EnableForCal; - uint32_t vDecay,vCalTime; - lv_obj_t *positionArc, *animArc,*calButton, *calLabel; + uint32_t vDecay, vCalTime; + lv_obj_t *positionArc, *animArc, *calButton, *calLabel; lv_task_t* refreshTask; }; } diff --git a/src/displayapp/screens/settings/SettingSteps.cpp b/src/displayapp/screens/settings/SettingSteps.cpp index 5ca3eecd..e92600c2 100644 --- a/src/displayapp/screens/settings/SettingSteps.cpp +++ b/src/displayapp/screens/settings/SettingSteps.cpp @@ -12,15 +12,12 @@ namespace { } } -SettingSteps::SettingSteps( - Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Settings &settingsController) : - Screen(app), - settingsController{settingsController} -{ +SettingSteps::SettingSteps(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController) + : Screen(app), settingsController {settingsController} { - lv_obj_t * container1 = lv_cont_create(lv_scr_act(), nullptr); + lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr); - //lv_obj_set_style_local_bg_color(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x111111)); + // lv_obj_set_style_local_bg_color(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x111111)); lv_obj_set_style_local_bg_opa(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP); lv_obj_set_style_local_pad_all(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 10); lv_obj_set_style_local_pad_inner(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5); @@ -31,13 +28,13 @@ SettingSteps::SettingSteps( lv_cont_set_layout(container1, LV_LAYOUT_COLUMN_LEFT); lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr); - lv_label_set_text_static(title,"Daily steps goal"); + lv_label_set_text_static(title, "Daily steps goal"); lv_label_set_align(title, LV_LABEL_ALIGN_CENTER); lv_obj_align(title, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 15, 15); lv_obj_t* icon = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE); - + lv_label_set_text_static(icon, Symbols::shoe); lv_label_set_align(icon, LV_LABEL_ALIGN_CENTER); lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0); @@ -61,7 +58,6 @@ SettingSteps::SettingSteps( lv_obj_set_event_cb(btnMinus, event_handler); lv_obj_align(btnMinus, lv_scr_act(), LV_ALIGN_CENTER, -55, 80); lv_obj_set_style_local_value_str(btnMinus, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, "-"); - } SettingSteps::~SettingSteps() { @@ -69,24 +65,23 @@ SettingSteps::~SettingSteps() { settingsController.SaveSettings(); } -void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) { +void SettingSteps::UpdateSelected(lv_obj_t* object, lv_event_t event) { uint32_t value = settingsController.GetStepsGoal(); - if(object == btnPlus && (event == LV_EVENT_PRESSED)) { + if (object == btnPlus && (event == LV_EVENT_PRESSED)) { value += 1000; - if ( value <= 500000 ) { + if (value <= 500000) { settingsController.SetStepsGoal(value); lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal()); lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10); } } - if(object == btnMinus && (event == LV_EVENT_PRESSED)) { + if (object == btnMinus && (event == LV_EVENT_PRESSED)) { value -= 1000; - if ( value >= 1000 ) { + if (value >= 1000) { settingsController.SetStepsGoal(value); lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal()); lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10); } } - } diff --git a/src/displayapp/screens/settings/Settings.cpp b/src/displayapp/screens/settings/Settings.cpp index bc7efcc2..a91b8f77 100644 --- a/src/displayapp/screens/settings/Settings.cpp +++ b/src/displayapp/screens/settings/Settings.cpp @@ -13,18 +13,19 @@ Settings::Settings(Pinetime::Applications::DisplayApp* app, Pinetime::Controller settingsController {settingsController}, screens {app, settingsController.GetSettingsMenu(), - {[this]() -> std::unique_ptr<Screen> { - return CreateScreen1(); - }, - [this]() -> std::unique_ptr<Screen> { - return CreateScreen2(); - }, - [this]() -> std::unique_ptr<Screen> { - return CreateScreen3(); - }, - [this]() -> std::unique_ptr<Screen> { - return CreateScreen4(); - }, + { + [this]() -> std::unique_ptr<Screen> { + return CreateScreen1(); + }, + [this]() -> std::unique_ptr<Screen> { + return CreateScreen2(); + }, + [this]() -> std::unique_ptr<Screen> { + return CreateScreen3(); + }, + [this]() -> std::unique_ptr<Screen> { + return CreateScreen4(); + }, }, Screens::ScreenListModes::UpDown} { } @@ -53,7 +54,8 @@ std::unique_ptr<Screen> Settings::CreateScreen2() { {Symbols::shoe, "Steps", Apps::SettingSteps}, {Symbols::clock, "Set date", Apps::SettingSetDate}, {Symbols::clock, "Set time", Apps::SettingSetTime}, - {Symbols::batteryHalf, "Battery", Apps::BatteryInfo}}}; + {Symbols::batteryHalf, "Battery", Apps::BatteryInfo}, + }}; return std::make_unique<Screens::List>(1, 4, app, settingsController, applications); } @@ -64,7 +66,7 @@ std::unique_ptr<Screen> Settings::CreateScreen3() { {Symbols::clock, "Chimes", Apps::SettingChimes}, {Symbols::tachometer, "Shake Calib.", Apps::SettingShakeThreshold}, {Symbols::check, "Firmware", Apps::FirmwareValidation}, - {Symbols::bluetooth, "Bluetooth", Apps::SettingBluetooth} + {Symbols::bluetooth, "Bluetooth", Apps::SettingBluetooth}, }}; return std::make_unique<Screens::List>(2, 4, app, settingsController, applications); @@ -76,7 +78,7 @@ std::unique_ptr<Screen> Settings::CreateScreen4() { {Symbols::list, "About", Apps::SysInfo}, {Symbols::none, "None", Apps::None}, {Symbols::none, "None", Apps::None}, - {Symbols::none, "None", Apps::None} + {Symbols::none, "None", Apps::None}, }}; return std::make_unique<Screens::List>(3, 4, app, settingsController, applications); |