mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-04-18 06:56:03 -04:00
fixes
This commit is contained in:
parent
9ef8811f72
commit
aa9aa45342
13
firmware/application/external/rf3d/ui_rf3d.cpp
vendored
13
firmware/application/external/rf3d/ui_rf3d.cpp
vendored
@ -16,7 +16,6 @@ RF3DView::RF3DView(NavigationView& nav)
|
||||
add_children({&rssi, &channel, &audio, &field_frequency, &field_lna, &field_vga,
|
||||
&options_modulation, &field_volume, &text_ctcss, &record_view, &dummy});
|
||||
|
||||
field_frequency.on_show_options = [this]() { this->on_show_options_frequency(); };
|
||||
field_lna.on_show_options = [this]() { this->on_show_options_rf_gain(); };
|
||||
field_vga.on_show_options = [this]() { this->on_show_options_rf_gain(); };
|
||||
|
||||
@ -70,7 +69,7 @@ void RF3DView::stop() {
|
||||
}
|
||||
|
||||
void RF3DView::update_spectrum(const AudioSpectrum& spectrum) {
|
||||
const int bins_per_bar = 128 / NUM_BARS; // Simple linear grouping
|
||||
const int bins_per_bar = 128 / NUM_BARS;
|
||||
for (int bar = 0; bar < NUM_BARS; bar++) {
|
||||
int start_bin = bar * bins_per_bar;
|
||||
uint8_t max_db = 0;
|
||||
@ -126,16 +125,6 @@ void RF3DView::on_modulation_changed(ReceiverModel::Mode modulation) {
|
||||
start();
|
||||
}
|
||||
|
||||
void RF3DView::on_show_options_frequency() {
|
||||
auto widget = std::make_unique<FrequencyOptionsView>(options_view_rect, Theme::getInstance()->option_active);
|
||||
widget->set_step(receiver_model.frequency_step());
|
||||
widget->on_change_step = [this](rf::Frequency f) { this->on_frequency_step_changed(f); };
|
||||
widget->set_reference_ppm_correction(persistent_memory::correction_ppb() / 1000);
|
||||
widget->on_change_reference_ppm_correction = [this](int32_t v) { this->on_reference_ppm_correction_changed(v); };
|
||||
set_options_widget(std::move(widget));
|
||||
field_frequency.set_style(Theme::getInstance()->option_active);
|
||||
}
|
||||
|
||||
void RF3DView::on_show_options_rf_gain() {
|
||||
auto widget = std::make_unique<RadioGainOptionsView>(options_view_rect, Theme::getInstance()->option_active);
|
||||
set_options_widget(std::move(widget));
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "portapack.hpp"
|
||||
#include "ui_record_view.hpp"
|
||||
#include "ui_spectrum.hpp"
|
||||
#include "ui_freq_field.hpp"
|
||||
|
||||
namespace ui::external_app::rf3d {
|
||||
|
||||
@ -44,7 +45,7 @@ private:
|
||||
RSSI rssi{{21 * 8, 0, 6 * 8, 4}};
|
||||
Channel channel{{21 * 8, 5, 6 * 8, 4}};
|
||||
Audio audio{{21 * 8, 10, 6 * 8, 4}};
|
||||
FrequencyField field_frequency{Point{5 * 8, 0 * 16}};
|
||||
RxFrequencyField field_frequency{{5 * 8, 0 * 16}, nav_};
|
||||
LNAGainField field_lna{Point{15 * 8, 0 * 16}};
|
||||
VGAGainField field_vga{Point{18 * 8, 0 * 16}};
|
||||
OptionsField options_modulation{
|
||||
@ -76,7 +77,6 @@ private:
|
||||
void update_spectrum(const AudioSpectrum& spectrum);
|
||||
void render_equalizer(Painter& painter);
|
||||
void on_modulation_changed(ReceiverModel::Mode modulation);
|
||||
void on_show_options_frequency();
|
||||
void on_show_options_rf_gain();
|
||||
void on_show_options_modulation();
|
||||
void on_frequency_step_changed(rf::Frequency f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user