mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-21 21:34:33 -04:00
More improvements to the rssi tone. Added saving of the tuned frequency
to the radio model persistent store.
This commit is contained in:
parent
43e123bafe
commit
a80d91fb1e
4 changed files with 31 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue