mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 09:25:30 -04:00
Don't update radio directly when saving/restoring tx/rx model settings. (#1160)
* Set rf direction in RadioState * centralize cpld load for TX->RX * Remove calls to load_sram from all apps * re-add CPLD hack, don't set radio values directly. --------- Co-authored-by: kallanreed <kallanreed@noreply.github.com>
This commit is contained in:
parent
3a5c2da66c
commit
650d299c99
30 changed files with 114 additions and 137 deletions
|
@ -41,13 +41,13 @@ class RadioState {
|
|||
RadioState(uint32_t new_bandwidth, uint32_t new_sampling_rate)
|
||||
: prev_bandwidth_{model->baseband_bandwidth()},
|
||||
prev_sampling_rate_{model->sampling_rate()} {
|
||||
model->set_baseband_bandwidth(new_bandwidth);
|
||||
model->set_sampling_rate(new_sampling_rate);
|
||||
model->set_configuration_without_update(
|
||||
new_bandwidth, new_sampling_rate);
|
||||
}
|
||||
|
||||
~RadioState() {
|
||||
model->set_baseband_bandwidth(prev_bandwidth_);
|
||||
model->set_sampling_rate(prev_sampling_rate_);
|
||||
model->set_configuration_without_update(
|
||||
prev_bandwidth_, prev_sampling_rate_);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -58,4 +58,4 @@ class RadioState {
|
|||
using RxRadioState = RadioState<ReceiverModel, &portapack::receiver_model>;
|
||||
using TxRadioState = RadioState<TransmitterModel, &portapack::transmitter_model>;
|
||||
|
||||
#endif // __RADIO_STATE_H__
|
||||
#endif // __RADIO_STATE_H__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue