summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:32:39 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:32:39 +0900
commitbb55b0eb5240c5f84856d2fac235c898582c8440 (patch)
tree5bcd00e7e61bee9711b737f7cc878c27b5d32b32 /device-functions.c
parent3c2b20b195786723329e3b212e973ea1132184b0 (diff)
report max change in cal correctly, by comparing using fabs on both sidesINSTRUMENT_6_4_36
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device-functions.c b/device-functions.c
index adf4cc4..02162cf 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -4239,7 +4239,7 @@ int go_cal(CalStruct *caldata)
++caldata->error;
} else {
++caldata->count;
- if (fabs(change)>caldata->max_change) {
+ if (fabs(change) > fabs(caldata->max_change)) {
caldata->max_change = change;
}
caldata->avg_change = ((caldata->avg_change * (((float) caldata->count) - 1.0)) + change) / caldata->count;