handle negative short values

This commit is contained in:
proddy
2019-12-05 23:20:00 +01:00
parent f96e2efe28
commit 2bfa899c0a

View File

@@ -55,6 +55,8 @@ char * _short_to_char(char * s, int16_t value, uint8_t decimals) {
if (value < 0) {
strlcpy(s, "-", 10);
value *= -1; // convert to positive
} else {
strlcpy(s, "", 10);
}
// do floating point