mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 10:57:48 +00:00
More improvements to the rssi tone. Added saving of the tuned frequency
to the radio model persistent store.
This commit is contained in:
@@ -66,6 +66,9 @@ SondeView::SondeView(NavigationView& nav) {
|
||||
&button_see_map
|
||||
});
|
||||
|
||||
// start from the frequency currently stored in the receiver_model:
|
||||
target_frequency_ = receiver_model.tuning_frequency();
|
||||
|
||||
field_frequency.set_value(target_frequency_);
|
||||
field_frequency.set_step(500); //euquiq: was 10000, but we are using this for fine-tunning
|
||||
field_frequency.on_change = [this](rf::Frequency f) {
|
||||
@@ -206,7 +209,9 @@ void SondeView::on_headphone_volume_changed(int32_t v) {
|
||||
|
||||
void SondeView::set_target_frequency(const uint32_t new_value) {
|
||||
target_frequency_ = new_value;
|
||||
radio::set_tuning_frequency(tuning_frequency());
|
||||
//radio::set_tuning_frequency(tuning_frequency());
|
||||
// we better remember the tuned frequency, by using this function instead:
|
||||
receiver_model.set_tuning_frequency(tuning_frequency());
|
||||
}
|
||||
|
||||
uint32_t SondeView::tuning_frequency() const {
|
||||
|
Reference in New Issue
Block a user