whipcalc parsing, bug fixes (#1174)

* whipcalc parsing, bug fixes
This commit is contained in:
Kyle Reed 2023-06-20 11:22:58 -07:00 committed by GitHub
parent 63b0093321
commit 909f37f89b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 63 additions and 71 deletions

View file

@ -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);
};