state-handler: add buttonHandler

This commit is contained in:
Vasily Davydov 2022-10-14 12:44:14 +03:00
parent 0a0f55a079
commit 885b23b832
2 changed files with 25 additions and 0 deletions

View File

@ -124,6 +124,12 @@ private:
* @param event
*/
void stateAuto (const Event &event);
/** Hnadle button presses
*
* @param button current button
*/
void handleControlButtons (uint8_t button);
};
#endif /* STATE_HANDLER_H_ */

View File

@ -131,3 +131,22 @@ stateAuto (const Event &event)
break;
}
}
void
handleControlButtons (uint8_t button)
{
switch (button)
{
case BUTTON_CONTROL_DOWN:
/* code */
break;
case BUTTON_CONTROL_UP:
/* code */
break;
case BUTTON_CONTROL_TOG_MODE:
/* code */
break;
default:
break;
}
}