Skip to content

Commit

Permalink
Fix for custom failsafe settings not being saved to SD card on color …
Browse files Browse the repository at this point in the history
…LCD radios.
  • Loading branch information
Phil Mitchell authored and richardclli committed Apr 12, 2023
1 parent 7f4a2f9 commit a907347
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions radio/src/gui/colorlcd/custom_failsafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ class ChannelFailsafeEdit : public NumberEdit
if (value != FAILSAFE_CHANNEL_HOLD && value != FAILSAFE_CHANNEL_NOPULSE) {
setSetValueHandler([=](int value) {
g_model.failsafeChannels[channel] = calc1000toRESX(value);
SET_DIRTY();
});
lv_obj_clear_state(lvobj, LV_STATE_DISABLED);
} else {
// disable setter to avoid overwritting the value limited by vmin/vmax
setSetValueHandler(nullptr);
lv_obj_add_state(lvobj, LV_STATE_DISABLED);
}
SET_DIRTY();
NumberEdit::update();
}

Expand Down

0 comments on commit a907347

Please sign in to comment.