mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 06:02:20 -04:00
parent
63b0093321
commit
909f37f89b
7 changed files with 63 additions and 71 deletions
|
@ -40,15 +40,14 @@ class BoundFrequencyField : public FrequencyField {
|
|||
public:
|
||||
decltype(FrequencyField::on_change) updated{};
|
||||
|
||||
BoundFrequencyField(Point parent_pos, NavigationView& nav, bool update_model = true)
|
||||
BoundFrequencyField(Point parent_pos, NavigationView& nav)
|
||||
: FrequencyField(parent_pos) {
|
||||
// NB: There is no frequency_step on the tx_model.
|
||||
set_step(portapack::receiver_model.frequency_step());
|
||||
set_value(model->target_frequency());
|
||||
|
||||
on_change = [this, update_model](rf::Frequency f) {
|
||||
if (update_model)
|
||||
model->set_target_frequency(f);
|
||||
on_change = [this](rf::Frequency f) {
|
||||
model->set_target_frequency(f);
|
||||
if (updated)
|
||||
updated(f);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue