Skip to content

Commit

Permalink
fix reports between S9 and S9+10, always return "plus"
Browse files Browse the repository at this point in the history
  • Loading branch information
F4FXL committed May 15, 2021
1 parent 0e39d81 commit 87a447f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ void CSMeter::getSignal(unsigned int rssi, unsigned int & signal, unsigned int &
{
if (rssi > RSSI_S1) {
signal = 0;
plus = 0;
plus = rssi - RSSI_S1;
}
else if (rssi >= RSSI_S9 && rssi <= RSSI_S1) {
signal = ((RSSI_S1 - rssi) / 6) + 1;
plus =0;
else if (rssi > RSSI_S9 && rssi <= RSSI_S1) {
signal = ((RSSI_S1 - rssi) / 6U) + 1U;
plus = (RSSI_S1 - rssi) % 6U;
}
else {
signal = 9U;
Expand Down

0 comments on commit 87a447f

Please sign in to comment.