diff --git a/src/payload.cpp b/src/payload.cpp index 81927bee..9cb46a77 100644 --- a/src/payload.cpp +++ b/src/payload.cpp @@ -207,7 +207,7 @@ void CayenneLPP::addCount(uint16_t value1, uint16_t value2) { buffer[cursor++] = value1; buffer[cursor++] = LPP_COUNT_BLE_CHANNEL; buffer[cursor++] = LPP_ANALOG_INPUT; // workaround, type meter not found? - buffer[cursor++] = value1 >> 8; + buffer[cursor++] = value2 >> 8; buffer[cursor++] = value2; } @@ -245,4 +245,4 @@ void CayenneLPP::addStatus(uint16_t voltage, uint64_t uptime, float cputemp) { buffer[cursor++] = LPP_TEMPERATURE; buffer[cursor++] = (uint16_t)cputemp >> 8; buffer[cursor++] = (uint16_t)cputemp; -} \ No newline at end of file +}