diff --git a/firmware/application/apps/ui_looking_glass_app.cpp b/firmware/application/apps/ui_looking_glass_app.cpp index 417fc5e4..94127d24 100644 --- a/firmware/application/apps/ui_looking_glass_app.cpp +++ b/firmware/application/apps/ui_looking_glass_app.cpp @@ -198,13 +198,17 @@ namespace ui field_frequency_min.set_step( steps ); field_frequency_min.on_change = [this](int32_t v) { - if( v > 7200 - steps ) + int32_t steps_ = steps ; + if( steps_ < 20 ) + steps_ = 20 ; + + if( v > 7200 - steps_ ) { - v = 7200 - steps ; + v = 7200 - steps_ ; field_frequency_min.set_value( v ); } - if (v >= (field_frequency_max.value() - steps ) ) - field_frequency_max.set_value( v + steps ); + if (v >= (field_frequency_max.value() - steps_ ) ) + field_frequency_max.set_value( v + steps_ ); this->on_range_changed(); }; @@ -224,14 +228,18 @@ namespace ui field_frequency_max.set_value(presets_db[0].max); // Defaults to first preset field_frequency_max.set_step( steps ); field_frequency_max.on_change = [this](int32_t v) - { - if( v < steps ) + { + int32_t steps_ = steps ; + if( steps_ < 20 ) + steps_ = 20 ; + + if( v < steps_ ) { - v = steps ; + v = steps_ ; field_frequency_max.set_value( v ); } - if (v < (field_frequency_min.value() + steps) ) - field_frequency_min.set_value(v - steps); + if (v < (field_frequency_min.value() + steps_) ) + field_frequency_min.set_value(v - steps_); this->on_range_changed(); }; diff --git a/firmware/application/apps/ui_looking_glass_app.hpp b/firmware/application/apps/ui_looking_glass_app.hpp index 05f950d1..f9089b1e 100644 --- a/firmware/application/apps/ui_looking_glass_app.hpp +++ b/firmware/application/apps/ui_looking_glass_app.hpp @@ -133,7 +133,7 @@ namespace ui { 22 * 8, 4 * 16}, 4, { - {"20", 20}, + {"1", 1}, {"50", 50}, {"100", 100}, {"250", 250},