Remove reference PPM methods from ReceiverModel.

This commit is contained in:
Jared Boone 2016-02-10 15:34:33 -08:00
parent b0e76191d7
commit 6c06549b6e
3 changed files with 3 additions and 13 deletions

View File

@ -22,6 +22,7 @@
#include "analog_audio_app.hpp" #include "analog_audio_app.hpp"
#include "portapack.hpp" #include "portapack.hpp"
#include "portapack_persistent_memory.hpp"
#include "portapack_shared_memory.hpp" #include "portapack_shared_memory.hpp"
using namespace portapack; using namespace portapack;
@ -225,7 +226,7 @@ void AnalogAudioView::on_show_options_frequency() {
widget->on_change_step = [this](rf::Frequency f) { widget->on_change_step = [this](rf::Frequency f) {
this->on_frequency_step_changed(f); this->on_frequency_step_changed(f);
}; };
widget->set_reference_ppm_correction(receiver_model.reference_ppm_correction()); widget->set_reference_ppm_correction(persistent_memory::correction_ppb() / 1000);
widget->on_change_reference_ppm_correction = [this](int32_t v) { widget->on_change_reference_ppm_correction = [this](int32_t v) {
this->on_reference_ppm_correction_changed(v); this->on_reference_ppm_correction_changed(v);
}; };
@ -281,7 +282,7 @@ void AnalogAudioView::on_frequency_step_changed(rf::Frequency f) {
} }
void AnalogAudioView::on_reference_ppm_correction_changed(int32_t v) { void AnalogAudioView::on_reference_ppm_correction_changed(int32_t v) {
receiver_model.set_reference_ppm_correction(v); persistent_memory::set_correction_ppb(v * 1000);
} }
void AnalogAudioView::on_headphone_volume_changed(int32_t v) { void AnalogAudioView::on_headphone_volume_changed(int32_t v) {

View File

@ -129,14 +129,6 @@ void ReceiverModel::set_frequency_step(rf::Frequency f) {
frequency_step_ = f; frequency_step_ = f;
} }
int32_t ReceiverModel::reference_ppm_correction() const {
return persistent_memory::correction_ppb() / 1000;
}
void ReceiverModel::set_reference_ppm_correction(int32_t v) {
persistent_memory::set_correction_ppb(v * 1000);
}
bool ReceiverModel::antenna_bias() const { bool ReceiverModel::antenna_bias() const {
return antenna_bias_; return antenna_bias_;
} }

View File

@ -48,9 +48,6 @@ public:
rf::Frequency frequency_step() const; rf::Frequency frequency_step() const;
void set_frequency_step(rf::Frequency f); void set_frequency_step(rf::Frequency f);
int32_t reference_ppm_correction() const;
void set_reference_ppm_correction(int32_t v);
bool antenna_bias() const; bool antenna_bias() const;
void set_antenna_bias(bool enabled); void set_antenna_bias(bool enabled);