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:
commit
31030dd29d
1 changed files with 4 additions and 0 deletions
4
src/main/fc/fc_msp.c
Executable file → Normal file
4
src/main/fc/fc_msp.c
Executable file → Normal 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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue