Skip to content

Commit

Permalink
Change Resp to int16
Browse files Browse the repository at this point in the history
  • Loading branch information
protocentralashwin committed Nov 6, 2024
1 parent 92f8185 commit 12f0cea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/src/data_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/ui/screens/scr_ecg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/screens/scr_ppg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion app/src/ui/screens/scr_resp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12f0cea

Please sign in to comment.