mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-29 01:06:27 -05:00
Move PPB clock adjustment out of ReceiverModel.
This commit is contained in:
parent
fd3f962e40
commit
a9451c17b4
@ -23,9 +23,9 @@
|
||||
|
||||
#include "portapack_shared_memory.hpp"
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
#include "portapack.hpp"
|
||||
using namespace portapack;
|
||||
|
||||
#include "radio.hpp"
|
||||
#include "audio.hpp"
|
||||
|
||||
#include "dsp_fir_taps.hpp"
|
||||
@ -135,7 +135,6 @@ int32_t ReceiverModel::reference_ppm_correction() const {
|
||||
|
||||
void ReceiverModel::set_reference_ppm_correction(int32_t v) {
|
||||
persistent_memory::set_correction_ppb(v * 1000);
|
||||
clock_manager.set_reference_ppb(v * 1000);
|
||||
}
|
||||
|
||||
bool ReceiverModel::antenna_bias() const {
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
#include "utility.hpp"
|
||||
@ -65,7 +67,9 @@ ppb_t correction_ppb() {
|
||||
}
|
||||
|
||||
void set_correction_ppb(const ppb_t new_value) {
|
||||
data->correction_ppb = ppb_range.clip(new_value);
|
||||
const auto clipped_value = ppb_range.clip(new_value);
|
||||
data->correction_ppb = clipped_value;
|
||||
portapack::clock_manager.set_reference_ppb(clipped_value);
|
||||
}
|
||||
|
||||
} /* namespace persistent_memory */
|
||||
|
Loading…
Reference in New Issue
Block a user