expose button to control displaying of remaining timer

This commit is contained in:
Nicu Hodos 2025-02-07 13:23:55 +01:00
parent 67355c7122
commit d123fe06ea
2 changed files with 10 additions and 0 deletions

View File

@ -94,6 +94,15 @@ namespace Devices {
}
}).build()
)
.addSecondary(
Builder<Button>::instance(new Button{"Display remaining timer", "display_remaining_timer",
[](const char* msg) {
if (strcmp("PRESS", msg) == 0 && !Display::Timer::tDisplayTimer.isEnabled()) {
Display::Timer::tDisplayTimer.restart();
}
}
}).build()
)
.addSecondary(
Builder<Button>::instance(new Button{"Update time", "update_time",
[](const char* msg) {

View File

@ -89,6 +89,7 @@ namespace Display {
}
}, &ts, false,
[]{
if (!tDisplayTime.isEnabled()) return false;
tDisplayTime.disable();
return true;
},