SettingWakeUp: use Checkboxlist.h
Update CheckboxList.h to optionally be able to get checkboxes (instead of the default of radio-buttons) and be able to have multi-selection through a new callback.
Use these updated capabilities of CheckboxList.h to replace the nearly identical code of SettingWakeUp.h
One noticable change is that previously all 5 wake-up-settings were on the same page. But with this PR and the default value of 4 settings per screen on CheckboxList.h we have two pages
Before:
Now:
Build size and comparison to main:
| Section | Size | Difference |
|---|---|---|
| text | 374712B | 528B |
| data | 948B | 0B |
| bss | 63480B | 0B |
I like the idea and the implementation via the IsChecked function.
I am only reading the code right now, but think we can simplify the interface. If I understand it correctly, the function is provided for checkboxes and the original value is provided for radio buttons? Can we infer the style from that and omit the boolean flag? And maybe make the original value optional, if it is not always needed?