Browse Source

AP_BLHeli: fix eRPM conversion

zr-v5.1
vierfuffzig 5 years ago committed by Andrew Tridgell
parent
commit
c97f785443
  1. 2
      libraries/AP_BLHeli/AP_BLHeli.cpp

2
libraries/AP_BLHeli/AP_BLHeli.cpp

@ -1342,7 +1342,7 @@ void AP_BLHeli::read_telemetry_packet(void)
td.voltage = (buf[1]<<8) | buf[2]; td.voltage = (buf[1]<<8) | buf[2];
td.current = (buf[3]<<8) | buf[4]; td.current = (buf[3]<<8) | buf[4];
td.consumption = (buf[5]<<8) | buf[6]; td.consumption = (buf[5]<<8) | buf[6];
td.rpm = ((buf[7]<<8) | buf[8]) * motor_poles; td.rpm = ((buf[7]<<8) | buf[8]) * 100 * 2 / motor_poles;
td.timestamp_ms = AP_HAL::millis(); td.timestamp_ms = AP_HAL::millis();
last_telem[last_telem_esc] = td; last_telem[last_telem_esc] = td;

Loading…
Cancel
Save