Using new CPLD data (fixes spectrum mirroring)

Scanner bugfix for wide ranges
Added squelch parameter for NFM receiver
Adjustment to Vumeter widget rendering
This commit is contained in:
furrtek 2017-06-11 09:50:29 +01:00
parent 042d271a9f
commit e2f0a03460
13 changed files with 105 additions and 54 deletions

View file

@ -1461,7 +1461,7 @@ VuMeter::VuMeter(
show_max_ { show_max }
{
//set_focusable(false);
LED_height = parent_rect.size().height() / LEDs;
LED_height = std::max(1UL, parent_rect.size().height() / LEDs);
split = 256 / LEDs;
}
@ -1507,7 +1507,7 @@ void VuMeter::paint(Painter& painter) {
else
color = lit ? Color::green() : Color::dark_green();
painter.fill_rectangle({ pos.x(), pos.y() + (Coord)(bar * LED_height), width, (Coord)LED_height - 2 }, color);
painter.fill_rectangle({ pos.x(), pos.y() + (Coord)(bar * (LED_height + 1)), width, (Coord)LED_height }, color);
}
prev_value = value_;
}