diff options
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 2 |
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; |