state-handler: create eKey fucntionality

This commit introduces buttonHandling of esp-vent
within the StateHandler class and main().
This commit is contained in:
Vasily Davydov
2022-10-14 13:53:00 +03:00
parent 736d8aa1b7
commit acb1b73b9a
7 changed files with 97 additions and 31 deletions

View File

@@ -23,10 +23,10 @@ class Event {
/** Time event */
eTick
};
Event(eventType e = eTick, int b = 0, int t = 0)
Event(eventType e = eTick, uint8_t b = 0, int t = 0)
: type(e), button(b), temp(t){};
eventType type;
int button;
uint8_t button;
int temp;
};

View File

@@ -96,7 +96,7 @@ private:
* @param newstate new state to be set to current
*/
void SetState (state_pointer newstate);
uint8_t current_mode;
bool current_mode;
Counter value[2] = { { 0, 100 }, { 0, 120 } };
LiquidCrystal *_lcd;