mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-04-17 04:11:29 +00:00
Added Bias Tee support for Replay and fixed file error logic bug
This commit is contained in:
parent
3cb3c95349
commit
434c559861
@ -97,6 +97,7 @@ void ReplayAppView::focus() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ReplayAppView::file_error() {
|
void ReplayAppView::file_error() {
|
||||||
|
//stop(false); // Fixes TX bug if there's a file error
|
||||||
nav_.display_modal("Error", "File read error.");
|
nav_.display_modal("Error", "File read error.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ void ReplayAppView::start() {
|
|||||||
auto open_error = p->open(file_path);
|
auto open_error = p->open(file_path);
|
||||||
if( open_error.is_valid() ) {
|
if( open_error.is_valid() ) {
|
||||||
file_error();
|
file_error();
|
||||||
|
return; // Fixes TX bug if there's a file error
|
||||||
} else {
|
} else {
|
||||||
reader = std::move(p);
|
reader = std::move(p);
|
||||||
}
|
}
|
||||||
@ -150,17 +152,19 @@ void ReplayAppView::start() {
|
|||||||
rf_amp = (bool)v;
|
rf_amp = (bool)v;
|
||||||
};
|
};
|
||||||
field_rfamp.set_value(rf_amp ? 14 : 0);
|
field_rfamp.set_value(rf_amp ? 14 : 0);
|
||||||
|
|
||||||
|
//Enable Bias Tee if selected
|
||||||
|
radio::set_antenna_bias(portapack::get_antenna_bias());
|
||||||
|
|
||||||
radio::enable({
|
radio::enable({
|
||||||
receiver_model.tuning_frequency(),
|
receiver_model.tuning_frequency(),
|
||||||
sample_rate * 8 ,
|
sample_rate * 8,
|
||||||
baseband_bandwidth,
|
baseband_bandwidth,
|
||||||
rf::Direction::Transmit,
|
rf::Direction::Transmit,
|
||||||
rf_amp, // previous code line : "receiver_model.rf_amp()," was passing the same rf_amp of all Receiver Apps
|
rf_amp, // previous code line : "receiver_model.rf_amp()," was passing the same rf_amp of all Receiver Apps
|
||||||
static_cast<int8_t>(receiver_model.lna()),
|
static_cast<int8_t>(receiver_model.lna()),
|
||||||
static_cast<int8_t>(receiver_model.vga())
|
static_cast<int8_t>(receiver_model.vga())
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplayAppView::stop(const bool do_loop) {
|
void ReplayAppView::stop(const bool do_loop) {
|
||||||
@ -170,6 +174,7 @@ void ReplayAppView::stop(const bool do_loop) {
|
|||||||
if (do_loop && check_loop.value()) {
|
if (do_loop && check_loop.value()) {
|
||||||
start();
|
start();
|
||||||
} else {
|
} else {
|
||||||
|
radio::set_antenna_bias(false); //Turn off Bias Tee
|
||||||
radio::disable();
|
radio::disable();
|
||||||
button_play.set_bitmap(&bitmap_play);
|
button_play.set_bitmap(&bitmap_play);
|
||||||
}
|
}
|
||||||
|
0
firmware/application/apps/ui_newapp.hpp
Normal file
0
firmware/application/apps/ui_newapp.hpp
Normal file
Loading…
x
Reference in New Issue
Block a user