#632 - still experimental

This commit is contained in:
proddy
2020-12-29 22:15:59 +01:00
parent fd0b74055f
commit 7c6aeb3cb9
57 changed files with 1284 additions and 833 deletions

View File

@@ -355,8 +355,9 @@ double Helpers::round2(double value, const uint8_t divider) {
return (int)((value / divider) * 100 + 0.5) / 100.0;
}
bool Helpers::check_abs(const int32_t i) {
return ((i < 0 ? -i : i) != 0xFFFFFF);
// abs of a signed 32-bit integer
uint32_t Helpers::abs(const int32_t i) {
return (i < 0 ? -i : i);
}
// for booleans, use isBool true (EMS_VALUE_BOOL)
@@ -467,6 +468,4 @@ bool Helpers::value2enum(const char * v, uint8_t & value, const flash_string_vec
}
} // namespace emsesp