From 0177cf75037bbc95af6842c7d409a20d15d9930f Mon Sep 17 00:00:00 2001 From: tofasthacker Date: Fri, 6 Oct 2023 21:04:42 -0400 Subject: [PATCH] changed chime (cherry picked from commit 8ff6bd9cae64a901fc362780c083c109fdcc5dde) --- src/displayapp/DisplayApp.cpp | 13 ++++++++++++- src/displayapp/DisplayApp.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index f5b163af..78a25a46 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -382,7 +382,18 @@ void DisplayApp::Refresh() { break; case Messages::Chime: LoadNewScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None); - motorController.RunForDuration(35); + time_var = dateTimeController.Minutes(); + if (time_var == 30){ + NRF_LOG_INFO("Short: %d", time_var); + motorController.RunForDuration(25); + } + else + { + NRF_LOG_INFO("Long: %d", time_var); + motorController.RunForDuration(200); + } + + break; case Messages::OnChargingEvent: RestoreBrightness(); diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index 96bce4dd..a7451aca 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -134,6 +134,7 @@ namespace Pinetime { Utility::StaticStack returnAppStack; Utility::StaticStack appStackDirections; + int time_var; bool isDimmed = false; }; }