Added RF amp setting in ADS-B RX

Removed frequency step, added LNA setting in Replay
Another menu bugfix :(
Updated binary
This commit is contained in:
furrtek 2017-12-08 21:46:16 +00:00
parent aba6c14074
commit 65a99bbe5a
7 changed files with 24 additions and 23 deletions

View File

@ -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

View File

@ -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();

View File

@ -75,16 +75,20 @@ private:
std::unique_ptr<ReplayThread> 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 {

View File

@ -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);

View File

@ -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) {

View File

@ -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<MenuItem> 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]);

Binary file not shown.