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

@@ -356,7 +356,8 @@ public:
const size_t channel_decimation,
const size_t deviation,
const iir_biquad_config_t audio_hpf_config,
const iir_biquad_config_t audio_deemph_config
const iir_biquad_config_t audio_deemph_config,
const uint8_t squelch_level
) : Message { ID::NBFMConfigure },
decim_0_filter(decim_0_filter),
decim_1_filter(decim_1_filter),
@@ -364,7 +365,8 @@ public:
channel_decimation { channel_decimation },
deviation { deviation },
audio_hpf_config(audio_hpf_config),
audio_deemph_config(audio_deemph_config)
audio_deemph_config(audio_deemph_config),
squelch_level(squelch_level)
{
}
@@ -375,6 +377,7 @@ public:
const size_t deviation;
const iir_biquad_config_t audio_hpf_config;
const iir_biquad_config_t audio_deemph_config;
const uint8_t squelch_level;
};
class WFMConfigureMessage : public Message {

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_;
}