diff --git a/app/src/data_module.c b/app/src/data_module.c index 862d6d6..0779436 100644 --- a/app/src/data_module.c +++ b/app/src/data_module.c @@ -28,6 +28,7 @@ LOG_MODULE_REGISTER(data_module, CONFIG_SENSOR_LOG_LEVEL); #include "spo2_process.h" #include "resp_process.h" #include "datalog_module.h" +#include "hw_module.h" // ProtoCentral data formats #define CES_CMDIF_PKT_START_1 0x0A @@ -130,7 +131,7 @@ float firState[NUM_TAPS + BLOCK_SIZE - 1]; int16_t spo2_serial; int16_t hr_serial; int16_t rr_serial; -extern int16_t temp_serial; +int16_t temp_serial; void send_data_ov3_format() { @@ -624,6 +625,8 @@ void data_thread(void) } } + temp_serial = hpi_hw_read_temp(); + k_sleep(K_MSEC(1)); } } diff --git a/app/src/hw_module.c b/app/src/hw_module.c index 60d38f0..df2bafd 100644 --- a/app/src/hw_module.c +++ b/app/src/hw_module.c @@ -70,8 +70,6 @@ const struct device *const max30001_dev = DEVICE_DT_GET_ANY(maxim_max30001); const struct device *const afe4400_dev = DEVICE_DT_GET_ANY(ti_afe4400); const struct device *const max30205_dev = DEVICE_DT_GET_ANY(maxim_max30205); const struct device *fg_dev; -struct hpi_temp_sensor_data_t temp_sensor_sample; -int16_t temp_serial; #ifdef CONFIG_HEALTHYPI_DISPLAY_ENABLED static const struct pwm_dt_spec bl_led_pwm = PWM_DT_SPEC_GET(DT_ALIAS(bl_led_pwm)); @@ -380,7 +378,6 @@ void hw_thread(void) global_batt_level = hpi_hw_read_batt(); global_temp_val = hpi_hw_read_temp(); - temp_serial = global_temp_val; #ifdef CONFIG_DISPLAY hpi_disp_update_batt_level(global_batt_level);