expose button to control displaying of remaining timer
This commit is contained in:
parent
67355c7122
commit
d123fe06ea
@ -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) {
|
||||
|
||||
@ -89,6 +89,7 @@ namespace Display {
|
||||
}
|
||||
}, &ts, false,
|
||||
[]{
|
||||
if (!tDisplayTime.isEnabled()) return false;
|
||||
tDisplayTime.disable();
|
||||
return true;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user