state-handler: #6 change constructor args
This commit is contained in:
parent
0c389658fa
commit
f95c15e13c
@ -7,24 +7,32 @@
|
|||||||
|
|
||||||
#include <StateHandler.h>
|
#include <StateHandler.h>
|
||||||
|
|
||||||
StateHandler::StateHandler(LiquidCrystal * lcd) {
|
StateHandler::StateHandler (LiquidCrystal *lcd)
|
||||||
|
{
|
||||||
this->_lcd = lcd;
|
this->_lcd = lcd;
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
StateHandler::~StateHandler() {
|
StateHandler::~StateHandler ()
|
||||||
|
{
|
||||||
// TODO Auto-generated destructor stub
|
// TODO Auto-generated destructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int StateHandler::getSetPressure(){
|
unsigned int
|
||||||
return (unsigned int)this->set[PRESSURE].getCurrent();
|
StateHandler::getSetPressure ()
|
||||||
|
{
|
||||||
|
return (unsigned int)this->set[PRESSURE].getCurrent ();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int StateHandler::getSetSpeed(){
|
unsigned int
|
||||||
return (unsigned int)this->set[FAN_SPEED].getCurrent();
|
StateHandler::getSetSpeed ()
|
||||||
|
{
|
||||||
|
return (unsigned int)this->set[FAN_SPEED].getCurrent ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateHandler::displaySet(unsigned int value1, unsigned int value2){
|
void
|
||||||
|
StateHandler::displaySet (unsigned int value1, unsigned int value2)
|
||||||
|
{
|
||||||
// TODO
|
// TODO
|
||||||
/**
|
/**
|
||||||
* MANUAL MODE:
|
* MANUAL MODE:
|
||||||
@ -40,13 +48,16 @@ void StateHandler::displaySet(unsigned int value1, unsigned int value2){
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateHandler::HandleState(const Event &event){
|
void
|
||||||
(this->*current)(event);
|
StateHandler::HandleState (const Event &event)
|
||||||
|
{
|
||||||
|
(this->*current) (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateHandler::SetState(state_pointer newstate){
|
void
|
||||||
(this->*current)(Event(Event::eExit));
|
StateHandler::SetState (state_pointer newstate)
|
||||||
|
{
|
||||||
|
(this->*current) (Event (Event::eExit));
|
||||||
current = newstate;
|
current = newstate;
|
||||||
(this->*current)(Event(Event::eEnter));
|
(this->*current) (Event (Event::eEnter));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user