use floats for sensor values. fix HA for sensors.

This commit is contained in:
proddy
2020-10-18 20:20:30 +02:00
parent 9d13b3db3b
commit 24c7c27d2c
6 changed files with 57 additions and 57 deletions

View File

@@ -31,7 +31,7 @@ namespace emsesp {
class Helpers {
public:
static char * hextoa(char * result, const uint8_t value, bool prefix = false);
static char * hextoa(char * result, const uint8_t value);
static std::string data_to_hex(const uint8_t * data, const uint8_t length);
static char * render_value(char * result, const float value, const uint8_t format); // format is the precision
@@ -47,7 +47,7 @@ class Helpers {
static char * smallitoa(char * result, const uint8_t value);
static char * smallitoa(char * result, const uint16_t value);
static char * itoa(char * result, int16_t value, const uint8_t base = 10);
static char * itoa(char * result, int32_t value, const uint8_t base = 10);
static uint32_t hextoint(const char * hex);
static uint16_t atoint(const char * value);
static bool check_abs(const int32_t i);