From 434c55986109f6d57b2f37a59f6a3d0010ce98ad Mon Sep 17 00:00:00 2001 From: notpike Date: Sat, 26 Mar 2022 21:20:49 -0700 Subject: [PATCH 1/3] Added Bias Tee support for Replay and fixed file error logic bug --- firmware/application/apps/replay_app.cpp | 11 ++++++++--- firmware/application/apps/ui_newapp.hpp | 0 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 firmware/application/apps/ui_newapp.hpp diff --git a/firmware/application/apps/replay_app.cpp b/firmware/application/apps/replay_app.cpp index 5b8d4a99..9d1f2acf 100644 --- a/firmware/application/apps/replay_app.cpp +++ b/firmware/application/apps/replay_app.cpp @@ -97,6 +97,7 @@ void ReplayAppView::focus() { } void ReplayAppView::file_error() { + //stop(false); // Fixes TX bug if there's a file error nav_.display_modal("Error", "File read error."); } @@ -121,6 +122,7 @@ void ReplayAppView::start() { auto open_error = p->open(file_path); if( open_error.is_valid() ) { file_error(); + return; // Fixes TX bug if there's a file error } else { reader = std::move(p); } @@ -150,17 +152,19 @@ void ReplayAppView::start() { rf_amp = (bool)v; }; field_rfamp.set_value(rf_amp ? 14 : 0); + + //Enable Bias Tee if selected + radio::set_antenna_bias(portapack::get_antenna_bias()); radio::enable({ receiver_model.tuning_frequency(), - sample_rate * 8 , + sample_rate * 8, baseband_bandwidth, rf::Direction::Transmit, rf_amp, // previous code line : "receiver_model.rf_amp()," was passing the same rf_amp of all Receiver Apps static_cast(receiver_model.lna()), static_cast(receiver_model.vga()) - }); - + }); } void ReplayAppView::stop(const bool do_loop) { @@ -170,6 +174,7 @@ void ReplayAppView::stop(const bool do_loop) { if (do_loop && check_loop.value()) { start(); } else { + radio::set_antenna_bias(false); //Turn off Bias Tee radio::disable(); button_play.set_bitmap(&bitmap_play); } diff --git a/firmware/application/apps/ui_newapp.hpp b/firmware/application/apps/ui_newapp.hpp new file mode 100644 index 00000000..e69de29b From 4ef98e2928b1d60005c5db6d008eaa739d0f09ce Mon Sep 17 00:00:00 2001 From: notpike Date: Sat, 26 Mar 2022 21:20:55 -0700 Subject: [PATCH 2/3] Added Bias Tee support for Replay and fixed file error logic bug --- firmware/application/apps/replay_app.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/application/apps/replay_app.cpp b/firmware/application/apps/replay_app.cpp index 9d1f2acf..9147c46f 100644 --- a/firmware/application/apps/replay_app.cpp +++ b/firmware/application/apps/replay_app.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2016 Jared Boone, ShareBrained Technology, Inc. * Copyright (C) 2016 Furrtek + * Copyleft (ↄ) 2022 NotPike * * This file is part of PortaPack. * @@ -97,7 +98,6 @@ void ReplayAppView::focus() { } void ReplayAppView::file_error() { - //stop(false); // Fixes TX bug if there's a file error nav_.display_modal("Error", "File read error."); } From 37a40cbedad4cc95c0c7613f4e5017447b71e494 Mon Sep 17 00:00:00 2001 From: NotPike <18655435+notpike@users.noreply.github.com> Date: Sun, 27 Mar 2022 00:40:45 -0400 Subject: [PATCH 3/3] Delete ui_newapp.hpp --- firmware/application/apps/ui_newapp.hpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 firmware/application/apps/ui_newapp.hpp diff --git a/firmware/application/apps/ui_newapp.hpp b/firmware/application/apps/ui_newapp.hpp deleted file mode 100644 index e69de29b..00000000