Implemented timeout reset on input event

This commit is contained in:
Mike C 2013-04-17 20:06:53 -04:00
parent ebd4ac5d04
commit 7f60a42f9b
2 changed files with 9 additions and 0 deletions

View file

@ -33,6 +33,10 @@ void UI::setLCDTimeout() {
uiTimeout->interval(config->getTimeoutMilis());
}
void UI::resetTimeout() {
uiTimeout->reset();
}
void UI::startUI() {
if (DEBUG) {
Serial.println("Config::startUI()");
@ -75,10 +79,12 @@ void UI::processInputEvents() {
enableUI();
return;
}
if (DEBUG) {
Serial.print("Joystick Event: ");
Serial.println(joyStickEvent);
}
resetTimeout();
lcd->handleJoystickEvent(joyStickEvent);
}
@ -87,6 +93,7 @@ void UI::processInputEvents() {
enableUI();
return;
}
resetTimeout();
lcd->handleOkButtonEvent();
}
@ -95,6 +102,7 @@ void UI::processInputEvents() {
enableUI();
return;
}
resetTimeout();
lcd->handleCancelButtonEvent();
}
}

View file

@ -49,6 +49,7 @@ public:
void enableUI();
void setLCDTimeout();
void resetTimeout();
};
#endif