mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
Merge 'upstream/master' - At least it builds...
This commit is contained in:
commit
5e40669cbc
298 changed files with 8122 additions and 4685 deletions
|
@ -117,6 +117,15 @@ void ReceiverModel::set_vga(int32_t v_db) {
|
|||
update_vga();
|
||||
}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
@ -144,11 +153,6 @@ void ReceiverModel::set_headphone_volume(volume_t v) {
|
|||
update_headphone_volume();
|
||||
}
|
||||
|
||||
uint32_t ReceiverModel::baseband_oversampling() const {
|
||||
// TODO: Rename decimation_factor.
|
||||
return decimation_factor_;
|
||||
}
|
||||
|
||||
void ReceiverModel::enable() {
|
||||
enabled_ = true;
|
||||
radio::set_direction(rf::Direction::Receive);
|
||||
|
@ -157,6 +161,7 @@ void ReceiverModel::enable() {
|
|||
update_rf_amp();
|
||||
update_lna();
|
||||
update_vga();
|
||||
update_tx_gain();
|
||||
update_baseband_bandwidth();
|
||||
update_sampling_rate();
|
||||
update_modulation();
|
||||
|
@ -206,6 +211,10 @@ void ReceiverModel::update_vga() {
|
|||
radio::set_vga_gain(vga_gain_db_);
|
||||
}
|
||||
|
||||
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() ) {
|
||||
am_config_index = n;
|
||||
|
@ -233,9 +242,8 @@ void ReceiverModel::update_sampling_rate() {
|
|||
// protocols that need quick RX/TX turn-around.
|
||||
|
||||
// Disabling baseband while changing sampling rates seems like a good idea...
|
||||
radio::set_baseband_rate(sampling_rate() * baseband_oversampling());
|
||||
radio::set_baseband_rate(sampling_rate());
|
||||
update_tuning_frequency();
|
||||
radio::set_baseband_decimation_by(baseband_oversampling());
|
||||
}
|
||||
|
||||
void ReceiverModel::update_headphone_volume() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue