payload.cpp fix cayenne battery value
This commit is contained in:
1 parent
62ebb534ba
commit
73f19ac654
1 file changed
+2
-1
+2
-1
@@ -221,12 +221,14 @@ void PayloadConvert::addStatus(uint16_t voltage, uint64_t uptime,
|
||||
float celsius) {
|
||||
uint16_t temp = celsius * 10;
|
||||
uint16_t volt = voltage / 10;
|
||||
#ifdef HAS_BATTERY_PROBE
|
||||
#if (PAYLOAD_ENCODER == 3)
|
||||
buffer[cursor++] = LPP_BATT_CHANNEL;
|
||||
#endif
|
||||
buffer[cursor++] = LPP_ANALOG_INPUT;
|
||||
buffer[cursor++] = highByte(volt);
|
||||
buffer[cursor++] = lowByte(volt);
|
||||
#endif
|
||||
#if (PAYLOAD_ENCODER == 3)
|
||||
buffer[cursor++] = LPP_TEMP_CHANNEL;
|
||||
#endif
|
||||
@@ -253,7 +255,6 @@ void PayloadConvert::addGPS(gpsStatus_t value) {
|
||||
buffer[cursor++] = (byte)((alt & 0xFF0000) >> 16);
|
||||
buffer[cursor++] = (byte)((alt & 0x00FF00) >> 8);
|
||||
buffer[cursor++] = (byte)((alt & 0x0000FF));
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user