Skip to content

Commit

Permalink
aod: analog watchface remove second hand
Browse files Browse the repository at this point in the history
Sometimes the watch LCD shuts off on the analog watch face, and removing the second hand prevents the issue
  • Loading branch information
KaffeinatedKat committed Oct 23, 2023
1 parent 6bbc44b commit a306dca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/displayapp/screens/WatchFaceAnalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void WatchFaceAnalog::UpdateClock() {
lv_line_set_points(hour_body_trace, hour_point_trace, 2);
}

if (sSecond != second) {
if (!alwaysOnDisplay.Get() && sSecond != second) {
sSecond = second;
auto const angle = second * 6;

Expand Down Expand Up @@ -237,6 +237,15 @@ void WatchFaceAnalog::Refresh() {
}
}

alwaysOnDisplay = settingsController.GetAlwaysOnDisplay();
if (alwaysOnDisplay.IsUpdated()) {
if (alwaysOnDisplay.Get()) {
lv_obj_set_hidden(second_body, true);
} else {
lv_obj_set_hidden(second_body, false);
}
}

bleState = bleController.IsConnected();
if (bleState.IsUpdated()) {
if (bleState.Get()) {
Expand Down
1 change: 1 addition & 0 deletions src/displayapp/screens/WatchFaceAnalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace Pinetime {
Utility::DirtyValue<uint8_t> batteryPercentRemaining {0};
Utility::DirtyValue<bool> isCharging {};
Utility::DirtyValue<bool> bleState {};
Utility::DirtyValue<bool> alwaysOnDisplay {};
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime;
Utility::DirtyValue<bool> notificationState {false};
using days = std::chrono::duration<int32_t, std::ratio<86400>>; // TODO: days is standard in c++20
Expand Down

0 comments on commit a306dca

Please sign in to comment.