mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Consolidate baseband disable code.
This commit is contained in:
parent
d9bfaaf805
commit
146caaab6f
@ -122,13 +122,16 @@ void ReceiverModel::enable() {
|
||||
update_headphone_volume();
|
||||
}
|
||||
|
||||
void ReceiverModel::disable() {
|
||||
/* TODO: This is a dumb hack to stop baseband from working so hard. */
|
||||
BasebandConfigurationMessage message {
|
||||
void ReceiverModel::baseband_disable() {
|
||||
shared_memory.baseband_queue.push_and_wait(
|
||||
BasebandConfigurationMessage {
|
||||
.configuration = { },
|
||||
};
|
||||
shared_memory.baseband_queue.push(message);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void ReceiverModel::disable() {
|
||||
baseband_disable();
|
||||
radio::disable();
|
||||
}
|
||||
|
||||
@ -172,9 +175,7 @@ void ReceiverModel::update_baseband_configuration() {
|
||||
// protocols that need quick RX/TX turn-around.
|
||||
|
||||
// Disabling baseband while changing sampling rates seems like a good idea...
|
||||
shared_memory.baseband_queue.push_and_wait(BasebandConfigurationMessage {
|
||||
.configuration = { },
|
||||
});
|
||||
baseband_disable();
|
||||
|
||||
clock_manager.set_sampling_frequency(sampling_rate() * baseband_oversampling());
|
||||
update_tuning_frequency();
|
||||
|
@ -107,6 +107,8 @@ private:
|
||||
void update_vga();
|
||||
void update_baseband_configuration();
|
||||
void update_headphone_volume();
|
||||
|
||||
void baseband_disable();
|
||||
};
|
||||
|
||||
#endif/*__RECEIVER_MODEL_H__*/
|
||||
|
Loading…
Reference in New Issue
Block a user