mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 06:49:24 -05:00
Restoring min step of 1, forcing 20Mhz minimum wide view
This commit is contained in:
parent
63d0201b71
commit
149cd755ca
@ -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();
|
||||
};
|
||||
|
||||
@ -225,13 +229,17 @@ namespace ui
|
||||
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();
|
||||
};
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace ui
|
||||
{ 22 * 8, 4 * 16},
|
||||
4,
|
||||
{
|
||||
{"20", 20},
|
||||
{"1", 1},
|
||||
{"50", 50},
|
||||
{"100", 100},
|
||||
{"250", 250},
|
||||
|
Loading…
Reference in New Issue
Block a user