Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: platform_drivers AD7124_no_OS adi_console_menu tempsensors_prv
Diff: app/ad7124_console_app.c
- Revision:
- 7:ef6fffc246a6
- Parent:
- 6:622270f7d476
- Child:
- 8:3d7b5897b028
diff -r 622270f7d476 -r ef6fffc246a6 app/ad7124_console_app.c
--- a/app/ad7124_console_app.c Tue Mar 23 20:29:51 2021 +0530
+++ b/app/ad7124_console_app.c Wed Mar 24 12:33:55 2021 +0530
@@ -983,13 +983,18 @@
chn++) {
if (sensor_enable_status[chn]) {
if (rtd_3wire_calibration_type == MEASURING_EXCITATION_CURRENT) {
- store_rtd_calibrated_iout_ratio((rtd_calib_iout0[chn][0] /
+ store_rtd_calibrated_iout_ratio((rtd_calib_iout1[chn][0] /
rtd_calib_iout0[chn][0]), true);
}
temperature = get_rtd_temperature(n_sample_data[chn][0], MULTI_3WIRE_RTD_GAIN);
sprintf(decimal_eqv_str, "%.4f ", temperature);
strcat(decimal_eqv_str_arr, decimal_eqv_str);
+
+ // for testing
+ sprintf(decimal_eqv_str, "%.4f ", rtd_calib_iout1[chn][0] /
+ rtd_calib_iout0[chn][0]);
+ strcat(decimal_eqv_str_arr, decimal_eqv_str);
}
}
printf("\t%s" EOL EOL, decimal_eqv_str_arr);
@@ -1001,14 +1006,19 @@
chn++) {
if (sensor_enable_status[chn]) {
if (rtd_3wire_calibration_type == MEASURING_EXCITATION_CURRENT) {
- store_rtd_calibrated_iout_ratio((rtd_calib_iout0[chn][sample_cnt] /
- rtd_calib_iout1[chn][sample_cnt]), true);
+ store_rtd_calibrated_iout_ratio((rtd_calib_iout1[chn][sample_cnt] /
+ rtd_calib_iout0[chn][sample_cnt]), true);
}
temperature = get_rtd_temperature(n_sample_data[chn][sample_cnt],
MULTI_3WIRE_RTD_GAIN);
sprintf(decimal_eqv_str, "%.4f ", temperature);
strcat(decimal_eqv_str_arr, decimal_eqv_str);
+
+ // for testing
+ sprintf(decimal_eqv_str, "%.4f ", rtd_calib_iout1[chn][sample_cnt] /
+ rtd_calib_iout0[chn][sample_cnt]);
+ strcat(decimal_eqv_str_arr, decimal_eqv_str);
}
}
printf("\t%s" EOL EOL, decimal_eqv_str_arr);