mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-27 16:56:15 -04:00
Don't update radio directly when saving/restoring tx/rx model settings. (#1160)
* Set rf direction in RadioState * centralize cpld load for TX->RX * Remove calls to load_sram from all apps * re-add CPLD hack, don't set radio values directly. --------- Co-authored-by: kallanreed <kallanreed@noreply.github.com>
This commit is contained in:
parent
3a5c2da66c
commit
650d299c99
30 changed files with 114 additions and 137 deletions
|
@ -30,7 +30,6 @@ using wolfson::wm8731::WM8731;
|
|||
|
||||
#include "tonesets.hpp"
|
||||
#include "portapack_hal.hpp"
|
||||
#include "cpld_update.hpp"
|
||||
#include "string_format.hpp"
|
||||
#include "irq_controls.hpp"
|
||||
|
||||
|
@ -172,7 +171,6 @@ void MicTXView::rxaudio(bool is_on) {
|
|||
receiver_model.set_vga(rx_vga);
|
||||
receiver_model.set_rf_amp(rx_amp);
|
||||
receiver_model.enable();
|
||||
hackrf::cpld::load_sram_no_verify(); // to have a good RX without any ghost inside Mic App
|
||||
audio::output::start();
|
||||
} else { // These incredibly convoluted steps are required for the vumeter to reappear when stopping RX.
|
||||
receiver_model.set_modulation(ReceiverModel::Mode::NarrowbandFMAudio); // This fixes something with AM RX...
|
||||
|
@ -609,8 +607,7 @@ MicTXView::~MicTXView() {
|
|||
transmitter_model.disable();
|
||||
if (rx_enabled) // Also turn off audio rx if enabled
|
||||
rxaudio(false);
|
||||
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue