mirror of https://github.com/ArduPilot/ardupilot
AP_BLHeli: allow for negative temperatures from BLHeli32 ESCs
ESCs can send negative values
This commit is contained in:
parent
300a118852
commit
cf0f95f81e
|
@ -1389,7 +1389,7 @@ void AP_BLHeli::read_telemetry_packet(void)
|
|||
return;
|
||||
}
|
||||
struct telem_data td;
|
||||
td.temperature = buf[0];
|
||||
td.temperature = int8_t(buf[0]);
|
||||
td.voltage = (buf[1]<<8) | buf[2];
|
||||
td.current = (buf[3]<<8) | buf[4];
|
||||
td.consumption = (buf[5]<<8) | buf[6];
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
struct telem_data {
|
||||
uint8_t temperature; // degrees C
|
||||
int8_t temperature; // degrees C, negative values allowed
|
||||
uint16_t voltage; // volts * 100
|
||||
uint16_t current; // amps * 100
|
||||
uint16_t consumption;// mAh
|
||||
|
|
Loading…
Reference in New Issue