mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-01 10:06:49 -04:00
Use receiver/transmitter models everywhere (#1056)
* Use receiver/transmitter models everywhere * Run formatter * Fix a copy-paste bug, make transmitter_model actually set tx_gain. --------- Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
parent
22c9dd31bf
commit
637bcfdbc7
20 changed files with 99 additions and 134 deletions
|
@ -307,11 +307,10 @@ void SystemStatusView::on_stealth() {
|
|||
}
|
||||
|
||||
void SystemStatusView::on_bias_tee() {
|
||||
if (!portapack::antenna_bias) {
|
||||
if (!portapack::get_antenna_bias()) {
|
||||
nav_.display_modal("Bias voltage", "Enable DC voltage on\nantenna connector?", YESNO, [this](bool v) {
|
||||
if (v) {
|
||||
portapack::set_antenna_bias(true);
|
||||
// radio::set_antenna_bias(true);
|
||||
receiver_model.set_antenna_bias();
|
||||
transmitter_model.set_antenna_bias();
|
||||
refresh();
|
||||
|
@ -319,9 +318,12 @@ void SystemStatusView::on_bias_tee() {
|
|||
});
|
||||
} else {
|
||||
portapack::set_antenna_bias(false);
|
||||
// radio::set_antenna_bias(false);
|
||||
receiver_model.set_antenna_bias();
|
||||
transmitter_model.set_antenna_bias();
|
||||
|
||||
// Ensure this is disabled. The models don't actually
|
||||
// update the radio unless they are 'enabled_'.
|
||||
radio::set_antenna_bias(false);
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue