Commit 17fdc693 authored by Lucas Russo's avatar Lucas Russo

examples/monit*: update monit registers prior to read

parent e1a958b9
......@@ -108,8 +108,16 @@ int main (int argc, char *argv [])
goto err_bpm_client_new;
}
uint32_t monit_updt = 1;
bpm_client_err_e err = bpm_set_monit_updt (bpm_client, service,
monit_updt);
if (err != BPM_CLIENT_SUCCESS){
fprintf (stderr, "[client:acq]: bpm_set_monit_updt failed\n");
goto err_set_monit_updt;
}
uint32_t monit_amp;
bpm_client_err_e err = bpm_get_monit_amp_ch0 (bpm_client, service,
err = bpm_get_monit_amp_ch0 (bpm_client, service,
&monit_amp);
if (err != BPM_CLIENT_SUCCESS){
fprintf (stderr, "[client:acq]: bpm_get_monit_amp_ch0 failed\n");
......@@ -144,6 +152,7 @@ int main (int argc, char *argv [])
err_bpm_client_new:
err_get_monit_amp:
err_set_monit_updt:
bpm_client_destroy (&bpm_client);
str_p = &board_number_str;
free (*str_p);
......
......@@ -108,8 +108,16 @@ int main (int argc, char *argv [])
goto err_bpm_client_new;
}
uint32_t monit_updt = 1;
bpm_client_err_e err = bpm_set_monit_updt (bpm_client, service,
monit_updt);
if (err != BPM_CLIENT_SUCCESS){
fprintf (stderr, "[client:acq]: bpm_set_monit_updt failed\n");
goto err_set_monit_updt;
}
uint32_t monit_pos;
bpm_client_err_e err = bpm_get_monit_pos_x (bpm_client, service,
err = bpm_get_monit_pos_x (bpm_client, service,
&monit_pos);
if (err != BPM_CLIENT_SUCCESS){
fprintf (stderr, "[client:acq]: bpm_get_monit_pos_x failed\n");
......@@ -144,6 +152,7 @@ int main (int argc, char *argv [])
err_bpm_client_new:
err_get_monit_pos:
err_set_monit_updt:
bpm_client_destroy (&bpm_client);
str_p = &board_number_str;
free (*str_p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment