Skip to content

Commit

Permalink
Merge pull request #3696 from iNavFlight/de_rssi_channel_fix
Browse files Browse the repository at this point in the history
Fix RSSI channel freeze when receiver is in failsafe
  • Loading branch information
digitalentity committed Aug 5, 2018
2 parents a71f209 + aa4eff9 commit 24398b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/rx/rx.c
Expand Up @@ -622,7 +622,7 @@ static void updateRSSIPWM(void)
int16_t pwmRssi = 0;
// Read value of AUX channel as rssi
if (rxConfig()->rssi_channel > 0) {
pwmRssi = rcData[rxConfig()->rssi_channel - 1];
pwmRssi = rcRaw[rxConfig()->rssi_channel - 1];

// Range of rawPwmRssi is [1000;2000]. rssi should be in [0;1023];
uint16_t rawRSSI = (uint16_t)((constrain(pwmRssi - 1000, 0, 1000) / 1000.0f) * (RSSI_MAX_VALUE * 1.0f));
Expand Down

0 comments on commit 24398b1

Please sign in to comment.