diff --git a/Core/Src/monitor.c b/Core/Src/monitor.c index 3363c11..1098260 100644 --- a/Core/Src/monitor.c +++ b/Core/Src/monitor.c @@ -34,7 +34,7 @@ uint16_t convert_can(uint16_t original_value, device_loc_t mode) osThreadId_t temp_monitor_handle; const osThreadAttr_t temp_monitor_attributes = { .name = "TempMonitor", - .stack_size = 64 * 8, + .stack_size = 64 * 16, .priority = (osPriority_t)osPriorityHigh1, }; diff --git a/Core/Src/msb.c b/Core/Src/msb.c index a1ba2c8..f1995d0 100644 --- a/Core/Src/msb.c +++ b/Core/Src/msb.c @@ -15,7 +15,7 @@ extern device_loc_t device_loc; osMutexId_t i2c_mutex; // reads imu reg -static inline int read_reg(uint8_t *data, +static inline int imu_read_reg(uint8_t *data, uint8_t reg, uint8_t length) { @@ -23,8 +23,8 @@ static inline int read_reg(uint8_t *data, I2C_MEMADD_SIZE_8BIT, data, length, HAL_MAX_DELAY); } -// read imu write -static inline int write_reg(uint8_t *data, +// read imu write +static inline int imu_write_reg(uint8_t *data, uint8_t reg, uint8_t length) { @@ -61,8 +61,7 @@ int8_t msb_init() #ifdef SENSOR_IMU /* Initialize the IMU */ - lsm6dso_t imu; - assert(!lsm6dso_init(&imu, read_reg, write_reg)); /* This is always connected */ + assert(!lsm6dso_init(&imu, imu_read_reg, imu_write_reg)); /* This is always connected */ #endif #ifdef SENSOR_TOF