From 5519cd35a9e6ebe1818f4f62f97332ad025540e7 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 20 Sep 2023 16:12:14 -0400 Subject: [PATCH 1/3] Added swipe left to show music controls and a green $ to the prompt in terminal watch face --- src/displayapp/DisplayApp.cpp | 3 +++ src/displayapp/screens/WatchFaceTerminal.cpp | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index ac1c4814..f5b163af 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -322,6 +322,9 @@ void DisplayApp::Refresh() { case TouchEvents::SwipeRight: LoadNewScreen(Apps::QuickSettings, DisplayApp::FullRefreshDirections::RightAnim); break; + case TouchEvents::SwipeLeft: + LoadNewScreen(Apps::Music, DisplayApp::FullRefreshDirections::LeftAnim); + break; case TouchEvents::DoubleTap: PushMessageToSystemTask(System::Messages::GoToSleep); break; diff --git a/src/displayapp/screens/WatchFaceTerminal.cpp b/src/displayapp/screens/WatchFaceTerminal.cpp index 96d77741..b0636902 100644 --- a/src/displayapp/screens/WatchFaceTerminal.cpp +++ b/src/displayapp/screens/WatchFaceTerminal.cpp @@ -10,8 +10,11 @@ #include "components/motion/MotionController.h" #include "components/settings/Settings.h" + + using namespace Pinetime::Applications::Screens; + WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController, const Controllers::Battery& batteryController, const Controllers::Ble& bleController, @@ -43,12 +46,14 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController, lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -40); label_prompt_1 = lv_label_create(lv_scr_act(), nullptr); + lv_label_set_recolor(label_prompt_1, true); lv_obj_align(label_prompt_1, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -80); - lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now"); + lv_label_set_text_static(label_prompt_1, "user@watch:~ #00ff00 $# now"); label_prompt_2 = lv_label_create(lv_scr_act(), nullptr); + lv_label_set_recolor(label_prompt_1, true); lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60); - lv_label_set_text_static(label_prompt_2, "user@watch:~ $"); + lv_label_set_text_static(label_prompt_2, "user@watch:~ #00ff00 $#"); label_time = lv_label_create(lv_scr_act(), nullptr); lv_label_set_recolor(label_time, true); @@ -143,6 +148,8 @@ void WatchFaceTerminal::Refresh() { lv_label_set_text_static(heartbeatValue, "[L_HR]#ee3311 ---#"); } } + + stepCount = motionController.NbSteps(); if (stepCount.IsUpdated()) { From c4537710c99dd038e2278eb8375328a376ee0e4c Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 23 Sep 2023 19:32:01 -0400 Subject: [PATCH 2/3] Fixed second $ in terminal watch face --- src/displayapp/screens/WatchFaceTerminal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/screens/WatchFaceTerminal.cpp b/src/displayapp/screens/WatchFaceTerminal.cpp index b0636902..7dbea41b 100644 --- a/src/displayapp/screens/WatchFaceTerminal.cpp +++ b/src/displayapp/screens/WatchFaceTerminal.cpp @@ -51,7 +51,7 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController, lv_label_set_text_static(label_prompt_1, "user@watch:~ #00ff00 $# now"); label_prompt_2 = lv_label_create(lv_scr_act(), nullptr); - lv_label_set_recolor(label_prompt_1, true); + lv_label_set_recolor(label_prompt_2, true); lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60); lv_label_set_text_static(label_prompt_2, "user@watch:~ #00ff00 $#"); From c82e91072052a5284f1f1b2e0545c6ee68625c1c Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 23 Sep 2023 22:25:36 -0400 Subject: [PATCH 3/3] Turn on flashlight on flashlight app launch --- src/displayapp/screens/FlashLight.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/displayapp/screens/FlashLight.cpp b/src/displayapp/screens/FlashLight.cpp index 1b7cf39c..16f25df0 100644 --- a/src/displayapp/screens/FlashLight.cpp +++ b/src/displayapp/screens/FlashLight.cpp @@ -47,6 +47,8 @@ FlashLight::FlashLight(System::SystemTask& systemTask, Controllers::BrightnessCo lv_obj_set_event_cb(backgroundAction, EventHandler); systemTask.PushMessage(Pinetime::System::Messages::DisableSleeping); + + Toggle(); } FlashLight::~FlashLight() {