Skip to content

Commit

Permalink
Merge pull request #11693 from daleckystepan/ghst-rssi-fix
Browse files Browse the repository at this point in the history
Ghost rssi fix
  • Loading branch information
haslinghuis committed Jun 27, 2022
2 parents 229ac66 + ac8484a commit aa8a37c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/rx/ghst.c
Expand Up @@ -248,7 +248,8 @@ static bool ghstProcessFrame(const rxRuntimeState_t *rxRuntimeState)

if (rssiSource == RSSI_SOURCE_RX_PROTOCOL) {
// 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);
}

Expand Down

0 comments on commit aa8a37c

Please sign in to comment.