mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
feat: add Modbus support
This commit is contained in:
@@ -837,4 +837,13 @@ uint16_t Helpers::string2minutes(const std::string & str) {
|
||||
}
|
||||
}
|
||||
|
||||
float Helpers::numericoperator2scalefactor(uint8_t numeric_operator) {
|
||||
if (numeric_operator == 0)
|
||||
return 1.0f;
|
||||
else if (numeric_operator > 0)
|
||||
return 1.0f / numeric_operator;
|
||||
else
|
||||
return -numeric_operator;
|
||||
}
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
Reference in New Issue
Block a user