From cc141bcb675d95b8dc664f9a247e6c2b9846085f Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Tue, 24 Jul 2018 15:30:00 +0200 Subject: [PATCH] changed cayenne data type (2) --- src/payload.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/payload.cpp b/src/payload.cpp index 672b2aa5..5769644f 100644 --- a/src/payload.cpp +++ b/src/payload.cpp @@ -193,20 +193,18 @@ void PayloadConvert::writeBitmap(bool a, bool b, bool c, bool d, bool e, bool f, #elif (PAYLOAD_ENCODER == 3 || PAYLOAD_ENCODER == 4) void PayloadConvert::addCount(uint16_t value1, uint16_t value2) { - uint16_t val1 = value1 * 100; - uint16_t val2 = value2 * 100; #if (PAYLOAD_ENCODER == 3) buffer[cursor++] = LPP_COUNT_WIFI_CHANNEL; #endif buffer[cursor++] = LPP_LUMINOSITY; // workaround, type meter not found? - buffer[cursor++] = highByte(val1); - buffer[cursor++] = lowByte(val1); + buffer[cursor++] = highByte(value1); + buffer[cursor++] = lowByte(value1); #if (PAYLOAD_ENCODER == 3) buffer[cursor++] = LPP_COUNT_BLE_CHANNEL; #endif buffer[cursor++] = LPP_LUMINOSITY; // workaround, type meter not found? - buffer[cursor++] = highByte(val2); - buffer[cursor++] = lowByte(val2); + buffer[cursor++] = highByte(value2); + buffer[cursor++] = lowByte(value2); } void PayloadConvert::addConfig(configData_t value) {