mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-29 16:06:57 -05:00
Revert "Additional debounce control parameters for rotary encoder settings (f…" (#2846)
This reverts commit bf18851b6b.
This commit is contained in:
parent
3b57672dda
commit
0f9d9e589d
8 changed files with 64 additions and 144 deletions
|
|
@ -681,27 +681,35 @@ SetEncoderDialView::SetEncoderDialView(NavigationView& nav) {
|
|||
add_children({&labels,
|
||||
&field_encoder_dial_sensitivity,
|
||||
&field_encoder_rate_multiplier,
|
||||
&field_encoder_dial_direction,
|
||||
&field_encoder_consecutive_hits,
|
||||
&field_encoder_cooldown_ms,
|
||||
&field_encoder_debounce_ms,
|
||||
&button_save,
|
||||
&button_cancel});
|
||||
&button_cancel,
|
||||
&button_dial_sensitivity_plus,
|
||||
&button_dial_sensitivity_minus,
|
||||
&button_rate_multiplier_plus,
|
||||
&button_rate_multiplier_minus,
|
||||
&field_encoder_dial_direction});
|
||||
|
||||
field_encoder_dial_sensitivity.set_by_value(pmem::encoder_dial_sensitivity());
|
||||
field_encoder_rate_multiplier.set_value(pmem::encoder_rate_multiplier());
|
||||
field_encoder_dial_direction.set_by_value(pmem::encoder_dial_direction());
|
||||
field_encoder_consecutive_hits.set_value(pmem::encoder_consecutive_hits());
|
||||
field_encoder_cooldown_ms.set_value(pmem::encoder_cooldown_ms());
|
||||
field_encoder_debounce_ms.set_value(pmem::encoder_debounce_ms());
|
||||
|
||||
button_dial_sensitivity_plus.on_select = [this](Button&) {
|
||||
field_encoder_dial_sensitivity.on_encoder(1);
|
||||
};
|
||||
button_dial_sensitivity_minus.on_select = [this](Button&) {
|
||||
field_encoder_dial_sensitivity.on_encoder(-1);
|
||||
};
|
||||
button_rate_multiplier_plus.on_select = [this](Button&) {
|
||||
field_encoder_rate_multiplier.on_encoder(1);
|
||||
};
|
||||
button_rate_multiplier_minus.on_select = [this](Button&) {
|
||||
field_encoder_rate_multiplier.on_encoder(-1);
|
||||
};
|
||||
|
||||
button_save.on_select = [&nav, this](Button&) {
|
||||
pmem::set_encoder_dial_sensitivity(field_encoder_dial_sensitivity.selected_index_value());
|
||||
pmem::set_encoder_rate_multiplier(field_encoder_rate_multiplier.value());
|
||||
pmem::set_encoder_dial_direction(field_encoder_dial_direction.selected_index_value());
|
||||
pmem::set_encoder_consecutive_hits(field_encoder_consecutive_hits.value());
|
||||
pmem::set_encoder_cooldown_ms(field_encoder_cooldown_ms.value());
|
||||
pmem::set_encoder_debounce_ms(field_encoder_debounce_ms.value());
|
||||
nav.pop();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue