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