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

Merge pull request #2911 from betaflight/fix-rssi-via-msp

CF/BF - Fix RSSI output via MSP.
This commit is contained in:
Michael Keller 2017-04-21 11:46:56 +12:00 committed by GitHub
commit 31030dd29d

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;