main: resolve pressure conflicts

This commit is contained in:
Vasily Davydov 2022-10-18 10:40:04 +03:00
parent b8dbe681fa
commit e57564c3ea
2 changed files with 4 additions and 7 deletions

View File

@ -6,6 +6,7 @@
*/ */
#include "PressureWrapper.h" #include "PressureWrapper.h"
#include <cstdio>
static uint8_t crc8(uint8_t *data, size_t size) { static uint8_t crc8(uint8_t *data, size_t size) {
uint8_t crc = 0x00; uint8_t crc = 0x00;

View File

@ -72,14 +72,10 @@ main (void)
SwitchController sw_toggle (&b_toggle, &glob_time, &ventMachine, SwitchController sw_toggle (&b_toggle, &glob_time, &ventMachine,
BUTTON_CONTROL_TOG_MODE); BUTTON_CONTROL_TOG_MODE);
// NVIC_DisableIRQ(I2C0_IRQn);
I2C_config config; PressureWrapper sens();
I2C i2c(config);
PressureWrapper sens(&i2c);
PRESSURE_DATA *pressure;
pressure = sens.getPressure();
while (1) while (1)
{ {
@ -91,7 +87,7 @@ main (void)
* TODO: * TODO:
* - Update current pressure to eTick * - Update current pressure to eTick
*/ */
ventMachine.HandleState (Event (Event::eTick, pressure)); ventMachine.HandleState (Event (Event::eTick));
glob_time.tickCounter (1); glob_time.tickCounter (1);
} }