event: add pressure member
Addition of a pressure parameter called from main and displayed on lcd
This commit is contained in:
parent
1709c0520b
commit
fe1d8eea61
@ -79,6 +79,10 @@ public:
|
|||||||
unsigned int getSetSpeed ();
|
unsigned int getSetSpeed ();
|
||||||
|
|
||||||
/** Display values on LCD depending on current mode
|
/** Display values on LCD depending on current mode
|
||||||
|
*
|
||||||
|
* MANUAL MODE: SPEED: XX% PRESSURE: XXPa
|
||||||
|
*
|
||||||
|
* AUTO MODE: P. SET: XXPa P. CURR: XXPa
|
||||||
*
|
*
|
||||||
* @param value1 value to be displayed on LCD line 0
|
* @param value1 value to be displayed on LCD line 0
|
||||||
* @param value2 value to be displayed on LCD line 1
|
* @param value2 value to be displayed on LCD line 1
|
||||||
@ -86,6 +90,7 @@ public:
|
|||||||
void displaySet (unsigned int value1, unsigned int value2);
|
void displaySet (unsigned int value1, unsigned int value2);
|
||||||
|
|
||||||
/** Handle the given event of the current state
|
/** Handle the given event of the current state
|
||||||
|
*
|
||||||
* @param event event to be handled in the current state
|
* @param event event to be handled in the current state
|
||||||
*/
|
*/
|
||||||
void HandleState (const Event &event);
|
void HandleState (const Event &event);
|
||||||
|
|||||||
@ -28,25 +28,11 @@ StateHandler::displaySet (unsigned int value1, unsigned int value2)
|
|||||||
|
|
||||||
if (current_mode == MANUAL)
|
if (current_mode == MANUAL)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* MANUAL MODE:
|
|
||||||
* ----------------
|
|
||||||
* SPEED: 20%
|
|
||||||
* PRESSURE: XXPa
|
|
||||||
* ----------------
|
|
||||||
*/
|
|
||||||
snprintf (line_up, 16, "SPEED: %02d%", value1);
|
snprintf (line_up, 16, "SPEED: %02d%", value1);
|
||||||
snprintf (line_down, 16, "PRESSURE: %02dPa", value2);
|
snprintf (line_down, 16, "PRESSURE: %02dPa", value2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* AUTO MODE:
|
|
||||||
* ----------------
|
|
||||||
* P. SET: 35Pa
|
|
||||||
* P. CURR: XXPa
|
|
||||||
* ----------------
|
|
||||||
*/
|
|
||||||
snprintf (line_up, 16, "P. SET: %02dPa", value1);
|
snprintf (line_up, 16, "P. SET: %02dPa", value1);
|
||||||
snprintf (line_down, 16, "P. CURR: %02dPa", value2);
|
snprintf (line_down, 16, "P. CURR: %02dPa", value2);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user