1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

CF/BF - Fix RSSI output via MSP.

This commit is contained in:
Hydra 2017-04-20 22:18:54 +01:00 committed by Dominic Clifton
parent 541d77db59
commit df9114a778

4
src/main/fc/fc_msp.c Executable file → Normal file
View file

@ -597,7 +597,11 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
case MSP_ANALOG:
sbufWriteU8(dst, (uint8_t)constrain(getBatteryVoltage(), 0, 255));
sbufWriteU16(dst, (uint16_t)constrain(getMAhDrawn(), 0, 0xFFFF)); // milliamp hours drawn from battery
#ifdef USE_OSD_SLAVE
sbufWriteU16(dst, 0); // rssi
#else
sbufWriteU16(dst, rssi);
#endif
sbufWriteU16(dst, (int16_t)constrain(getAmperage(), -0x8000, 0x7FFF)); // send current in 0.01 A steps, range is -320A to 320A
break;