mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 15:37:49 +00:00
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:
@@ -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 {
|
||||
|
@@ -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_;
|
||||
}
|
||||
|
Reference in New Issue
Block a user