From 5d23955574d844e33152be61c3360dce981ed0e8 Mon Sep 17 00:00:00 2001 From: Vasily Davydov Date: Wed, 21 Sep 2022 11:20:12 +0300 Subject: [PATCH] wip: eventhandler: #6 document the class --- EventHandler/inc/EventHandler.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/EventHandler/inc/EventHandler.h b/EventHandler/inc/EventHandler.h index 10d9ce0..9c91738 100644 --- a/EventHandler/inc/EventHandler.h +++ b/EventHandler/inc/EventHandler.h @@ -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;