mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
#632 - still experimental
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user