-
-
Notifications
You must be signed in to change notification settings - Fork 352
Description
Affected Version
0.15.0-dev
Describe the Bug
So I was developing some new features, let's say it's
enum POWER_BTN_HOLD_DURATION { PB_FAST = 0, PB_NORMAL = 1, PB_SLOW = 2, PB_XSLOW = 3 };
I had the PB_XSLOW selected, but then a few commits later I removed it and kept only:
enum POWER_BTN_HOLD_DURATION { PB_FAST = 0, PB_NORMAL = 1, PB_SLOW = 2 };
The device still tries to use = 3 and crashes when opening reader or settings.
Steps to Reproduce
- Device: Select any setting (i.e. Referesh Frequency - 30 pages)
- Dev: Remove this option (REFRESH_30) and run the update
- Device: Freezes while opening settings
I have a draft PR for this with removed REFRESH_30 option, if you flash it to the device it will stop opening settings. The only solution is to delete .crosspoint/settings.bin via PC.
Expected Behavior
If some settings do not load, they should change to default variant. But it wasn't the case, because it still tried to get a non-existent value. It fails in SettingsActivity.cpp
This applies not only to development, but also for prod. If a user selects a enum value that has been removed in a future update, the entire device will stop working.