@@ -22,8 +22,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
2222 : Screen(app),
2323 screenID {screenID},
2424 OnValueChanged{std::move (OnValueChanged)},
25- options {options},
26- newValue{originalValue} {
25+ options {options}, value {originalValue} {
2726 // Set the background to Black
2827 lv_obj_set_style_local_bg_color (lv_scr_act (), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
2928
@@ -92,7 +91,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
9291
9392CheckboxList::~CheckboxList () {
9493 lv_obj_clean (lv_scr_act ());
95- OnValueChanged (newValue );
94+ OnValueChanged (value );
9695}
9796
9897void CheckboxList::UpdateSelected (lv_obj_t * object, lv_event_t event) {
@@ -101,7 +100,7 @@ void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) {
101100 if (strcmp (options[i], " " )) {
102101 if (object == cbOption[i]) {
103102 lv_checkbox_set_checked (cbOption[i], true );
104- newValue = MaxItems * screenID + i;
103+ value = MaxItems * screenID + i;
105104 } else {
106105 lv_checkbox_set_checked (cbOption[i], false );
107106 }
0 commit comments