mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Fix Ghost RSSI values
This commit is contained in:
parent
229ac66755
commit
ac8484af28
1 changed files with 2 additions and 1 deletions
|
@ -248,7 +248,8 @@ static bool ghstProcessFrame(const rxRuntimeState_t *rxRuntimeState)
|
||||||
|
|
||||||
if (rssiSource == RSSI_SOURCE_RX_PROTOCOL) {
|
if (rssiSource == RSSI_SOURCE_RX_PROTOCOL) {
|
||||||
// rssi sent sign-inverted
|
// rssi sent sign-inverted
|
||||||
const uint16_t rssiPercentScaled = scaleRange(-rssiFrame->rssi, GHST_RSSI_DBM_MIN, 0, GHST_RSSI_DBM_MAX, RSSI_MAX_VALUE);
|
uint16_t rssiPercentScaled = scaleRange(-rssiFrame->rssi, GHST_RSSI_DBM_MIN, GHST_RSSI_DBM_MAX, 0, RSSI_MAX_VALUE);
|
||||||
|
rssiPercentScaled = MIN(rssiPercentScaled, RSSI_MAX_VALUE);
|
||||||
setRssi(rssiPercentScaled, RSSI_SOURCE_RX_PROTOCOL);
|
setRssi(rssiPercentScaled, RSSI_SOURCE_RX_PROTOCOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue