diff --git a/app/src/data_module.c b/app/src/data_module.c index da4d464..a2dc040 100644 --- a/app/src/data_module.c +++ b/app/src/data_module.c @@ -410,12 +410,12 @@ void buffer_ecg_data_for_serial(int32_t *ecg_data_in, int ecg_len, int32_t *bioz { for (int i = 0; i < ecg_len; i++) { - ecg_serial_streaming[serial_ecg_counter++] = (int16_t)ecg_data_in[i] >> 8; + ecg_serial_streaming[serial_ecg_counter++] = (int16_t)(ecg_data_in[i] >> 16); } for (int i = 0; i < bioz_len; i++) { - resp_serial_streaming[serial_bioz_counter++] = (int16_t)bioz_data_in[i] >> 8; + resp_serial_streaming[serial_bioz_counter++] = (int16_t)(bioz_data_in[i] >> 16); } } else @@ -427,13 +427,13 @@ void buffer_ecg_data_for_serial(int32_t *ecg_data_in, int ecg_len, int32_t *bioz memset(resp_serial_streaming, 0, sizeof(resp_serial_streaming)); for (int i = 0; i < bioz_len; i++) { - resp_serial_streaming[serial_bioz_counter++] = (int16_t)bioz_data_in[i] >> 8; + resp_serial_streaming[serial_bioz_counter++] = (int16_t)(bioz_data_in[i] >> 16); // resp_serial_streaming[serial_bioz_counter++] = (int16_t) 50; } for (int i = 0; i < ecg_len; i++) { - ecg_serial_streaming[serial_ecg_counter++] = (int16_t)ecg_data_in[i] >> 8; + ecg_serial_streaming[serial_ecg_counter++] = (int16_t)(ecg_data_in[i] >> 16); } } } diff --git a/app/src/ui/screens/scr_ecg.c b/app/src/ui/screens/scr_ecg.c index eced52e..9c06680 100644 --- a/app/src/ui/screens/scr_ecg.c +++ b/app/src/ui/screens/scr_ecg.c @@ -113,9 +113,9 @@ void hpi_ecg_disp_draw_plot_ecg(int32_t *data_ecg, int num_samples, bool ecg_lea // printk("E"); lv_chart_set_next_value(chart_ecg, ser_ecg, data_ecg_i); - //hpi_ecg_disp_add_samples(1); - //hpi_ecg_disp_do_set_scale(DISP_WINDOW_SIZE_ECG); + hpi_ecg_disp_add_samples(1); } + hpi_ecg_disp_do_set_scale(DISP_WINDOW_SIZE_ECG); // lv_chart_set_next_value(chart_ecg, ser_ecg, data_ecg); // hpi_ecg_disp_add_samples(1); // hpi_ecg_disp_do_set_scale(DISP_WINDOW_SIZE_ECG); diff --git a/app/src/ui/screens/scr_ppg.c b/app/src/ui/screens/scr_ppg.c index 4bd4190..109dba1 100644 --- a/app/src/ui/screens/scr_ppg.c +++ b/app/src/ui/screens/scr_ppg.c @@ -106,7 +106,7 @@ void hpi_ppg_disp_draw_plot_ppg(int32_t *data_ppg_red, int32_t *data_ppg_ir, int lv_chart_set_next_value(chart_ppg, ser_ppg, data_ppg_i); hpi_ppg_disp_add_samples(1); } - // hpi_ppg_disp_do_set_scale(PPG_DISP_WINDOW_SIZE); + hpi_ppg_disp_do_set_scale(PPG_DISP_WINDOW_SIZE); } if (ppg_lead_off == true) diff --git a/app/src/ui/screens/scr_resp.c b/app/src/ui/screens/scr_resp.c index 9ec438a..ee74f8b 100644 --- a/app/src/ui/screens/scr_resp.c +++ b/app/src/ui/screens/scr_resp.c @@ -107,8 +107,9 @@ void hpi_resp_disp_draw_plot_resp(int32_t *data_resp, int num_samples, bool resp lv_chart_set_next_value(chart_resp, ser_resp, data_resp_i); hpi_resp_disp_add_samples(1); - hpi_resp_disp_do_set_scale(RESP_DISP_WINDOW_SIZE); + } + hpi_resp_disp_do_set_scale(RESP_DISP_WINDOW_SIZE); } if (resp_lead_off == true)