Persist tuned frequency.

w00t!
This commit is contained in:
Jared Boone
2015-08-04 10:31:03 -07:00
parent 4870f0015b
commit d855336985
4 changed files with 22 additions and 4 deletions

View File

@@ -27,11 +27,11 @@
using namespace portapack;
rf::Frequency ReceiverModel::tuning_frequency() const {
return tuning_frequency_;
return persistent_memory::tuned_frequency();
}
void ReceiverModel::set_tuning_frequency(rf::Frequency f) {
tuning_frequency_ = f;
persistent_memory::set_tuned_frequency(f);
update_tuning_frequency();
}
@@ -158,7 +158,7 @@ int32_t ReceiverModel::tuning_offset() {
}
void ReceiverModel::update_tuning_frequency() {
radio::set_tuning_frequency(tuning_frequency_ + tuning_offset());
radio::set_tuning_frequency(persistent_memory::tuned_frequency() + tuning_offset());
}
void ReceiverModel::update_rf_amp() {

View File

@@ -76,7 +76,6 @@ public:
void disable();
private:
rf::Frequency tuning_frequency_ { 858750000 };
rf::Frequency frequency_step_ { 25000 };
bool rf_amp_ { false };
int32_t lna_gain_db_ { 32 };