#include "ButtonsCommander.hpp"
Public Member Functions | |
ButtonsCommanderClass () | |
void | begin () |
void | beforeFirstLoop () |
ButtonsCommanderButton * | Add (ButtonsCommanderButton *inpButton) |
ButtonsCommanderButton * | GetFromId (unsigned long inId) const |
unsigned long | loop () |
Static Public Member Functions | |
static ButtonsCommanderButton * | AddButton (ButtonsCommanderButton *inpButton) |
static ButtonsCommanderClass & | GetCurrent () |
This Commanders receive orders from all kind of physical buttons.
This commander is mainly a list of buttons. This is not maintained by CMDRSCHAINEDLIST, but it is the same way of work.
Definition at line 40 of file ButtonsCommander.hpp.
ButtonsCommanderClass::ButtonsCommanderClass | ( | ) |
Default constructor.
Definition at line 23 of file ButtonsCommander.cpp.
ButtonsCommanderButton * ButtonsCommanderClass::Add | ( | ButtonsCommanderButton * | inpButton | ) |
Add a new button to the internal linked list.
inpButton | Button to add. |
Definition at line 43 of file ButtonsCommander.cpp.
|
static |
Add a new button to the internal linked list of the static ButtonsCommander.
inpButton | Button to add. |
Definition at line 35 of file ButtonsCommander.cpp.
|
virtual |
This function will be called after sketch Setup(), but before the first call to loop(). It will be called only one time.
Reimplemented from Commander.
Definition at line 78 of file ButtonsCommander.cpp.
void ButtonsCommanderClass::begin | ( | ) |
Initialize the instance.
Definition at line 28 of file ButtonsCommander.cpp.
|
inlinestatic |
Get the current instance of DccCommanderClass
Definition at line 87 of file ButtonsCommander.hpp.
ButtonsCommanderButton * ButtonsCommanderClass::GetFromId | ( | unsigned long | inId | ) | const |
Gets a button address from its id.
inId | id to find. |
Definition at line 61 of file ButtonsCommander.cpp.
|
virtual |
Main loop function.
Reimplemented from Commander.
Definition at line 89 of file ButtonsCommander.cpp.