Skip to content

Commit

Permalink
fix(bandscan): changes bandscan to use max rssi and not mean
Browse files Browse the repository at this point in the history
  • Loading branch information
JyeSmith committed Sep 13, 2018
1 parent c52c954 commit bc20262
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rx5808-pro-diversity/state_bandscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ void StateMachine::BandScanStateHandler::onUpdate() {
return;

if (!EepromSettings.quadversity) {
rssiData[orderedChanelIndex] = (Receiver::rssiA + Receiver::rssiB) / 2;
rssiData[orderedChanelIndex] = max(Receiver::rssiA, Receiver::rssiB);
}
if (EepromSettings.quadversity) {
rssiData[orderedChanelIndex] = ((Receiver::rssiA + Receiver::rssiB)/2 + (Receiver::rssiC + Receiver::rssiD)/2) / 2;
rssiData[orderedChanelIndex] = max(Receiver::rssiA, max(Receiver::rssiB, max(Receiver::rssiC, Receiver::rssiD)));
}

orderedChanelIndex = (orderedChanelIndex + 1) % (CHANNELS_SIZE);
Expand Down

0 comments on commit bc20262

Please sign in to comment.