28 : lcd::MenuView(
display,
"UnlockedMainMenu",
encoder,
"Unlocked Main Menu", numberOfColumns, numberOfRows) {}
49 if (menuItems.empty()) {
52 createMenuItem(
"Open Safe", [](MenuItem*) {
54 if (!timeRestictions.restrictUnlockTimes || timeRestictions.checkTime()) {
61 createMenuItem(
"Set Custom Timer", [](MenuItem*) {
64 createMenuItem(
"Emlalock Unlock Key", [](MenuItem*) {
67 createMenuItem(
"Preferences", [](MenuItem*) {
70 createMenuItem(
"Hardware Test View", [](MenuItem*) {
73 createMenuItem(
"Reboot", [](MenuItem*) {
77 lcd::MenuView::activate();
86 virtual void tick(
const bool& forceRedraw) {
88 lcd::MenuView::tick(forceRedraw);
const TimeRestrictions & getTimeRestrictions() const
get the timeout of display backlight in seconds
Definition: Configuration.h:354
static Configuration & getSingleton()
Get the Singleton object.
Definition: Configuration.h:162
Main menu as long as there is no active session.
Definition: UnlockedMainMenu.h:17
UnlockedMainMenu(const UnlockedMainMenu &other)=delete
Copy constructor - not available.
virtual void tick(const bool &forceRedraw)
called during the loop function
Definition: UnlockedMainMenu.h:86
UnlockedMainMenu(LiquidCrystal_PCF8574 *display, RotaryEncoder *encoder, const int &numberOfColumns, const int &numberOfRows)
Construct a new main menu object.
Definition: UnlockedMainMenu.h:27
virtual void activate()
called as soon as the view becomes active
Definition: UnlockedMainMenu.h:47
UnlockedMainMenu(UnlockedMainMenu &&other) noexcept=delete
Move constructor - not available otherwise we get problems with the callbacks.
static bool activateView(const ViewId &id)
activates the view described by the id
Definition: ViewStore.h:98
@ PreferencesMenu
Definition: ViewStore.h:32
@ UnlockSafeView
Definition: ViewStore.h:38
@ HardwareTestView
Definition: ViewStore.h:29
@ TimeRestrictedView
Definition: ViewStore.h:36
@ SetTimerView
Definition: ViewStore.h:35
@ EmlalockUnlockKeyMenu
Definition: ViewStore.h:28
views::ConfigurationServerView configurationServerView & display
Definition: main.cpp:57
RotaryEncoder encoder(ENCODER_PIN_CLK, ENCODER_PIN_DT, ENCODER_SWITCH)
Definition: ConfigurationServerView.h:10