wip: eventhandler: #6 document the class
This commit is contained in:
parent
e8f3593704
commit
5d23955574
@ -3,6 +3,13 @@
|
||||
*
|
||||
* Created on: Sep 21, 2022
|
||||
* Author: tylen
|
||||
*
|
||||
* Purpose of this class is to store and pass
|
||||
* the events of the current mode to further process.
|
||||
*
|
||||
* Current goal is to make it to operate on interrupts
|
||||
* caused by button presses.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EVENTHANDLER_H_
|
||||
@ -11,6 +18,14 @@
|
||||
#include "DigitalIoPin.h"
|
||||
#include "Counter.h"
|
||||
|
||||
/** A structure to hold button pointers
|
||||
*
|
||||
* Main four buttons that operate the
|
||||
* whole program. The structure should be
|
||||
* initialized in main with correct values and
|
||||
* passed to main EvenHandler object constructor.
|
||||
*
|
||||
* */
|
||||
typedef struct _EVENT_HANDL{
|
||||
DigitalIoPin * _button_control_up;
|
||||
DigitalIoPin * _button_control_down;
|
||||
@ -22,8 +37,8 @@ class EventHandler {
|
||||
public:
|
||||
EventHandler(EVENT_HANDL btns);
|
||||
virtual ~EventHandler();
|
||||
int getSetPresuure();
|
||||
int getSetSpeed();
|
||||
int getSetPresuure(); // Get currently set pressure 0-100%
|
||||
int getSetSpeed(); //Get currently set FanSpeed 0-100%
|
||||
private:
|
||||
EVENT_HANDL internal = {0,0,0,0};
|
||||
bool mode;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user