Switched from fabs to std::abs which is type-aware and safer going forward.

This commit is contained in:
Rob Giseburt
2017-12-03 16:10:22 -06:00
parent 459f7c5c43
commit b70abe4067
13 changed files with 53 additions and 61 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ static uint8_t _populate_filtered_status_report()
nv_get_nvObj(nv);
// report values that have changed by more than 0.0001, but always stops and ends
if ((fabs(nv->value - sr.status_report_value[i]) > EPSILON3) ||
if ((std::abs(nv->value - sr.status_report_value[i]) > EPSILON3) ||
((nv->index == sr.stat_index) && fp_EQ(nv->value, COMBINED_PROGRAM_STOP)) ||
((nv->index == sr.stat_index) && fp_EQ(nv->value, COMBINED_PROGRAM_END))) {