mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
CF/BF - Fix RSSI output via MSP.
This commit is contained in:
parent
541d77db59
commit
df9114a778
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:
|
case MSP_ANALOG:
|
||||||
sbufWriteU8(dst, (uint8_t)constrain(getBatteryVoltage(), 0, 255));
|
sbufWriteU8(dst, (uint8_t)constrain(getBatteryVoltage(), 0, 255));
|
||||||
sbufWriteU16(dst, (uint16_t)constrain(getMAhDrawn(), 0, 0xFFFF)); // milliamp hours drawn from battery
|
sbufWriteU16(dst, (uint16_t)constrain(getMAhDrawn(), 0, 0xFFFF)); // milliamp hours drawn from battery
|
||||||
|
#ifdef USE_OSD_SLAVE
|
||||||
sbufWriteU16(dst, 0); // rssi
|
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
|
sbufWriteU16(dst, (int16_t)constrain(getAmperage(), -0x8000, 0x7FFF)); // send current in 0.01 A steps, range is -320A to 320A
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue