mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Periph: fixed current decoding for HWESC
This commit is contained in:
parent
bca1bd2c72
commit
5462c468cd
@ -105,8 +105,8 @@ bool HWESC_Telem::parse_packet(void)
|
||||
decoded.throttle = be16toh(pkt.throttle);
|
||||
decoded.rpm = be16toh(pkt.rpm);
|
||||
decoded.voltage = be16toh(pkt.voltage) * 0.1;
|
||||
decoded.load = be16toh(pkt.load);
|
||||
decoded.current = be16toh(pkt.current);
|
||||
decoded.load = int16_t(be16toh(pkt.load));
|
||||
decoded.current = int16_t(be16toh(pkt.current)) * 0.01;
|
||||
decoded.temperature = be16toh(pkt.temperature);
|
||||
decoded.unknown = be16toh(pkt.unknown);
|
||||
|
||||
|
@ -44,8 +44,8 @@ private:
|
||||
uint16_t throttle;
|
||||
uint16_t rpm;
|
||||
uint16_t voltage;
|
||||
uint16_t load;
|
||||
uint16_t current;
|
||||
int16_t current;
|
||||
int16_t load;
|
||||
uint16_t temperature;
|
||||
uint16_t unknown;
|
||||
uint16_t crc;
|
||||
|
Loading…
Reference in New Issue
Block a user