diff --git a/firmware/application/main.cpp b/firmware/application/main.cpp index ebea5fcd..e16fbe4c 100755 --- a/firmware/application/main.cpp +++ b/firmware/application/main.cpp @@ -32,6 +32,7 @@ //BUG: SCANNER Lock on frequency, if frequency jump, still locked on first one //BUG: SCANNER Multiple slices +//TODO: Make entries disappear from RecentEntries list in ADS-B RX (after 2 minutes with no update ?) //TODO: Display file creation/modification date in FileLoadView //TODO: Super simple text file viewer //TODO: Display recording frequency in Replay (from associated .txt file, if present) @@ -42,12 +43,9 @@ //TODO: Remove make_bistream from encoders.cpp, too complex, stinks. bitstream_append should be enough. //TODO: Continue work on proc_afskrx_corr, see python script (it works !) //TODO: De bruijn sequence scanner for encoders -//TODO: FILEMAN Rename folders //TODO: FILEMAN Move files -//TODO: Frequency and bw settings were removed from modemsetup, put those back in LCR TX //TODO: Use separate thread for scanning in EPAR TX //TODO: Use separate thread for scanning in LCR TX -//TODO: REPLAY Convert C16 to C8 on M0 core //TODO: Make freqman refresh simpler (use previous black rectangle method) //TODO: Merge AFSK and TONES procs ? //TODO: NFM RX mode: nav.pop on squelch diff --git a/firmware/application/replay_app.cpp b/firmware/application/replay_app.cpp index 118c6201..b51a647f 100644 --- a/firmware/application/replay_app.cpp +++ b/firmware/application/replay_app.cpp @@ -149,8 +149,9 @@ ReplayAppView::ReplayAppView( baseband::run_image(portapack::spi_flash::image_tag_replay); add_children({ + &labels, &field_frequency, - &field_frequency_step, + &field_lna, &field_rf_amp, &button_play, &text_filename, @@ -174,11 +175,7 @@ ReplayAppView::ReplayAppView( }; }; - field_frequency_step.set_by_value(receiver_model.frequency_step()); - field_frequency_step.on_change = [this](size_t, OptionsField::value_t v) { - receiver_model.set_frequency_step(v); - this->field_frequency.set_step(v); - }; + field_frequency.set_step(5000); button_play.on_select = [this](ImageButton&) { this->toggle(); diff --git a/firmware/application/replay_app.hpp b/firmware/application/replay_app.hpp index af007f19..e8cc21d7 100644 --- a/firmware/application/replay_app.hpp +++ b/firmware/application/replay_app.hpp @@ -75,16 +75,20 @@ private: std::unique_ptr replay_thread { }; bool ready_signal { false }; + Labels labels { + { { 10 * 8, 0 * 8 }, "LNA: AMP:", Color::light_grey() } + }; + FrequencyField field_frequency { { 0 * 8, 0 * 16 }, }; - FrequencyStepView field_frequency_step { - { 10 * 8, 0 * 16 }, + LNAGainField field_lna { + { 14 * 8, 0 * 16 } }; RFAmpField field_rf_amp { - { 16 * 8, 0 * 16 } + { 21 * 8, 0 * 16 } }; ImageButton button_play { diff --git a/firmware/application/ui_adsb_rx.cpp b/firmware/application/ui_adsb_rx.cpp index 60430d1c..b27f1854 100644 --- a/firmware/application/ui_adsb_rx.cpp +++ b/firmware/application/ui_adsb_rx.cpp @@ -260,9 +260,10 @@ ADSBRxView::ADSBRxView(NavigationView& nav) { baseband::run_image(portapack::spi_flash::image_tag_adsb_rx); add_children({ &labels, - &rssi, &field_lna, &field_vga, + &field_rf_amp, + &rssi, &recent_entries_view }); @@ -284,7 +285,6 @@ ADSBRxView::ADSBRxView(NavigationView& nav) { baseband::set_adsb(); receiver_model.set_tuning_frequency(1090000000); - receiver_model.set_rf_amp(true); field_lna.set_value(40); field_vga.set_value(40); receiver_model.set_modulation(ReceiverModel::Mode::SpectrumAnalysis); diff --git a/firmware/application/ui_adsb_rx.hpp b/firmware/application/ui_adsb_rx.hpp index 56f973be..fb343e20 100644 --- a/firmware/application/ui_adsb_rx.hpp +++ b/firmware/application/ui_adsb_rx.hpp @@ -30,7 +30,6 @@ #include "adsb.hpp" #include "message.hpp" - using namespace adsb; namespace ui { @@ -218,11 +217,7 @@ private: bool send_updates { false }; Labels labels { - { { 0 * 8, 0 * 8 }, "LNA: VGA: RSSI:", Color::light_grey() } - }; - - RSSI rssi { - { 19 * 8, 4, 10 * 8, 8 }, + { { 0 * 8, 0 * 8 }, "LNA: VGA: AMP:", Color::light_grey() } }; LNAGainField field_lna { @@ -233,6 +228,14 @@ private: { 11 * 8, 0 * 16 } }; + RFAmpField field_rf_amp { + { 18 * 8, 0 * 16 } + }; + + RSSI rssi { + { 20 * 8, 4, 10 * 8, 8 }, + }; + MessageHandlerRegistration message_handler_frame { Message::ID::ADSBFrame, [this](Message* const p) { diff --git a/firmware/application/ui_menu.cpp b/firmware/application/ui_menu.cpp index c7a23a53..cfe64553 100644 --- a/firmware/application/ui_menu.cpp +++ b/firmware/application/ui_menu.cpp @@ -144,7 +144,7 @@ void MenuView::set_parent_rect(const Rect new_parent_rect) { menu_item_views.push_back(item); add_child(item); - auto y_pos = c * item_height; + Coord y_pos = c * item_height; item->set_parent_rect({ { 0, y_pos }, { size().width(), (Coord)item_height } @@ -187,7 +187,6 @@ void MenuView::add_items(std::initializer_list new_items) { void MenuView::update_items() { size_t i = 0; - int32_t y_pos; if (menu_items.size() > displayed_max + offset) { more = true; @@ -196,7 +195,7 @@ void MenuView::update_items() { more = false; for (auto item : menu_item_views) { - if (i + offset >= menu_items.size()) break; + if (i >= menu_items.size()) break; // Assign item data to MenuItemViews according to offset item->set_item(&menu_items[i + offset]); diff --git a/firmware/portapack-h1-havoc.bin b/firmware/portapack-h1-havoc.bin index ba82a120..8dbe559a 100644 Binary files a/firmware/portapack-h1-havoc.bin and b/firmware/portapack-h1-havoc.bin differ