expose button to control displaying of remaining timer
This commit is contained in:
parent
67355c7122
commit
d123fe06ea
@ -94,6 +94,15 @@ namespace Devices {
|
|||||||
}
|
}
|
||||||
}).build()
|
}).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(
|
.addSecondary(
|
||||||
Builder<Button>::instance(new Button{"Update time", "update_time",
|
Builder<Button>::instance(new Button{"Update time", "update_time",
|
||||||
[](const char* msg) {
|
[](const char* msg) {
|
||||||
|
|||||||
@ -89,6 +89,7 @@ namespace Display {
|
|||||||
}
|
}
|
||||||
}, &ts, false,
|
}, &ts, false,
|
||||||
[]{
|
[]{
|
||||||
|
if (!tDisplayTime.isEnabled()) return false;
|
||||||
tDisplayTime.disable();
|
tDisplayTime.disable();
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user