diff --git a/esp-vent-main/src/PressureWrapper.cpp b/esp-vent-main/src/PressureWrapper.cpp index 3dcf978..3bc42ea 100644 --- a/esp-vent-main/src/PressureWrapper.cpp +++ b/esp-vent-main/src/PressureWrapper.cpp @@ -6,6 +6,7 @@ */ #include "PressureWrapper.h" +#include static uint8_t crc8(uint8_t *data, size_t size) { uint8_t crc = 0x00; diff --git a/esp-vent-main/src/esp-vent-main.cpp b/esp-vent-main/src/esp-vent-main.cpp index 4f6422e..2ed9296 100644 --- a/esp-vent-main/src/esp-vent-main.cpp +++ b/esp-vent-main/src/esp-vent-main.cpp @@ -72,14 +72,10 @@ main (void) SwitchController sw_toggle (&b_toggle, &glob_time, &ventMachine, BUTTON_CONTROL_TOG_MODE); -// NVIC_DisableIRQ(I2C0_IRQn); - I2C_config config; - I2C i2c(config); - PressureWrapper sens(&i2c); + PressureWrapper sens(); + - PRESSURE_DATA *pressure; - pressure = sens.getPressure(); while (1) { @@ -91,7 +87,7 @@ main (void) * TODO: * - Update current pressure to eTick */ - ventMachine.HandleState (Event (Event::eTick, pressure)); + ventMachine.HandleState (Event (Event::eTick)); glob_time.tickCounter (1); }