root: init sensors: humidity+temp, CO2. Pressure sensor is now static class
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include "LiquidCrystal.h"
|
||||
#include "ModbusMaster.h"
|
||||
#include "ModbusRegister.h"
|
||||
#include "GMP252.h"
|
||||
#include "HMP60.h"
|
||||
|
||||
/** Buttons enumeration
|
||||
*
|
||||
@@ -118,6 +120,12 @@ private:
|
||||
LiquidCrystal *_lcd;
|
||||
ModbusRegister *A01;
|
||||
|
||||
/* CO2 sensor object */
|
||||
GMP252 co2;
|
||||
|
||||
/* Humidity and temperature sensor object */
|
||||
HMP60 humidity;
|
||||
|
||||
/** Initialization state
|
||||
*
|
||||
* @param event event of the state
|
||||
|
||||
@@ -139,6 +139,8 @@ StateHandler::stateAuto (const Event &event)
|
||||
// this->A01->write(fan_speed.getCurrent());
|
||||
if(saved_curr_value[AUTO] < saved_set_value[AUTO]) {
|
||||
fan_speed.inc();
|
||||
while(i<720) i++;
|
||||
i = 0;
|
||||
this->A01->write(fan_speed.getCurrent());
|
||||
} else if(saved_curr_value[AUTO] > saved_set_value[AUTO]){
|
||||
fan_speed.dec();
|
||||
@@ -150,6 +152,7 @@ StateHandler::stateAuto (const Event &event)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
StateHandler::handleControlButtons (uint8_t button)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user