mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 17:17:28 -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
|
@ -118,14 +118,14 @@ void ReceiverModel::set_vga(int32_t v_db) {
|
|||
update_vga();
|
||||
}
|
||||
|
||||
int32_t ReceiverModel::tx_gain() const {
|
||||
/*int32_t ReceiverModel::tx_gain() const {
|
||||
return tx_gain_db_;
|
||||
}
|
||||
|
||||
void ReceiverModel::set_tx_gain(int32_t v_db) {
|
||||
tx_gain_db_ = v_db;
|
||||
update_tx_gain();
|
||||
}
|
||||
}*/
|
||||
|
||||
uint32_t ReceiverModel::sampling_rate() const {
|
||||
return sampling_rate_;
|
||||
|
@ -171,7 +171,7 @@ void ReceiverModel::enable() {
|
|||
update_rf_amp();
|
||||
update_lna();
|
||||
update_vga();
|
||||
update_tx_gain();
|
||||
// update_tx_gain();
|
||||
update_baseband_bandwidth();
|
||||
update_sampling_rate();
|
||||
update_modulation();
|
||||
|
@ -185,7 +185,6 @@ void ReceiverModel::enable() {
|
|||
|
||||
void ReceiverModel::disable() {
|
||||
enabled_ = false;
|
||||
radio::set_antenna_bias(false);
|
||||
|
||||
// TODO: Responsibility for enabling/disabling the radio is muddy.
|
||||
// Some happens in ReceiverModel, some inside radio namespace.
|
||||
|
@ -230,9 +229,9 @@ void ReceiverModel::update_vga() {
|
|||
radio::set_vga_gain(vga_gain_db_);
|
||||
}
|
||||
|
||||
void ReceiverModel::update_tx_gain() {
|
||||
/*void ReceiverModel::update_tx_gain() {
|
||||
radio::set_tx_gain(tx_gain_db_);
|
||||
}
|
||||
}*/
|
||||
|
||||
void ReceiverModel::set_am_configuration(const size_t n) {
|
||||
if (n < am_configs.size()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue