From 7eba8fd49bc0fb37f2970c053da9b7c293356d47 Mon Sep 17 00:00:00 2001 From: GullCode Date: Mon, 20 Mar 2023 16:43:31 +0100 Subject: [PATCH] fixing width too tiny for calculation. It has to be a multiple of 240 --- .../application/apps/ui_looking_glass_app.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/firmware/application/apps/ui_looking_glass_app.cpp b/firmware/application/apps/ui_looking_glass_app.cpp index 35c852ce..ed5a20cf 100644 --- a/firmware/application/apps/ui_looking_glass_app.cpp +++ b/firmware/application/apps/ui_looking_glass_app.cpp @@ -199,8 +199,8 @@ namespace ui field_frequency_min.on_change = [this](int32_t v) { int32_t steps_ = steps ; - if( steps_ < 20 ) - steps_ = 20 ; + if( steps_ < 24 ) + steps_ = 24 ; if( v > 7200 - steps_ ) { v = 7200 - steps_ ; @@ -216,8 +216,8 @@ namespace ui new_view->on_changed = [this, &field](rf::Frequency f) { int32_t freq = f / 1000000 ; int32_t steps_ = steps ; - if( steps_ < 20 ) - steps_ = 20 ; + if( steps_ < 24 ) + steps_ = 24 ; if( freq > (7200 - steps_ ) ) freq= 7200 - steps_ ; field_frequency_min.set_value( freq ); @@ -232,8 +232,8 @@ namespace ui field_frequency_max.on_change = [this](int32_t v) { int32_t steps_ = steps ; - if( steps_ < 20 ) - steps_ = 20 ; + if( steps_ < 24 ) + steps_ = 24 ; if( v < steps_ ) { v = steps_ ; @@ -248,11 +248,11 @@ namespace ui auto new_view = nav_.push(field_frequency_max.value()*1000000); new_view->on_changed = [this, &field](rf::Frequency f) { int32_t steps_ = steps ; - if( steps_ < 20 ) - steps_ = 20 ; + if( steps_ < 24 ) + steps_ = 24 ; int32_t freq = f / 1000000 ; - if( freq < 20 ) - freq = 20 ; + if( freq < 24 ) + freq = 24 ; field_frequency_max.set_value( freq ); if( field_frequency_min.value() > ( freq - steps) ) field_frequency_min.set_value( freq - steps );