Skip to content

Commit

Permalink
Spectrum warp-around when switching steps
Browse files Browse the repository at this point in the history
  • Loading branch information
JuantAldea authored and egzumer committed Dec 24, 2023
1 parent bc9bb48 commit 34f2168
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/spectrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,10 @@ static void UpdateDBMax(bool inc) {
}

static void UpdateScanStep(bool inc) {
if (inc && settings.scanStepIndex < S_STEP_100_0kHz) {
settings.scanStepIndex++;
} else if (!inc && settings.scanStepIndex > 0) {
settings.scanStepIndex--;
if (inc) {
settings.scanStepIndex = settings.scanStepIndex != S_STEP_100_0kHz ? settings.scanStepIndex + 1 : 0;
} else {
return;
settings.scanStepIndex = settings.scanStepIndex != 0 ? settings.scanStepIndex - 1 : S_STEP_100_0kHz;
}

settings.frequencyChangeStep = GetBW() >> 1;
Expand Down

0 comments on commit 34f2168

Please sign in to comment.