Skip to content

Commit

Permalink
Fix scale change.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Dec 29, 2022
1 parent 863dc84 commit 09990d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,16 +318,17 @@ int32_t protoview_app_entry(void* p) {
while(app->running) {
FuriStatus qstat = furi_message_queue_get(app->event_queue, &input, 100);
if (qstat == FuriStatusOk) {
uint32_t scale_step = app->us_scale > 50 ? 50 : 10;
if (input.key == InputKeyBack) {
app->running = 0;
} else if (input.key == InputKeyOk) {
app->signal_bestlen = 0;
raw_samples_reset(DetectedSamples);
raw_samples_reset(RawSamples);
} else if (input.key == InputKeyDown) {
uint32_t scale_step = app->us_scale >= 50 ? 50 : 10;
if (app->us_scale < 500) app->us_scale += scale_step;
} else if (input.key == InputKeyUp) {
uint32_t scale_step = app->us_scale > 50 ? 50 : 10;
if (app->us_scale > 10) app->us_scale -= scale_step;
}

Expand Down

0 comments on commit 09990d6

Please sign in to comment.