Switches fix (because we have more than 256 switches today)
This commit is contained in:
@@ -190,7 +190,7 @@ typedef int choice_t;
|
|||||||
|
|
||||||
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event);
|
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event);
|
||||||
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char * label, LcdFlags attr, event_t event);
|
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char * label, LcdFlags attr, event_t event);
|
||||||
int8_t editSwitch(coord_t x, coord_t y, int8_t value, LcdFlags attr, event_t event);
|
swsrc_t editSwitch(coord_t x, coord_t y, swsrc_t value, LcdFlags attr, event_t event);
|
||||||
|
|
||||||
#define ON_OFF_MENU_ITEM(value, x, y, label, attr, event) value = editCheckBox(value, x, y, label, attr, event)
|
#define ON_OFF_MENU_ITEM(value, x, y, label, attr, event) value = editCheckBox(value, x, y, label, attr, event)
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char *label, Lcd
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t editSwitch(coord_t x, coord_t y, int8_t value, LcdFlags attr, event_t event)
|
swsrc_t editSwitch(coord_t x, coord_t y, swsrc_t value, LcdFlags attr, event_t event)
|
||||||
{
|
{
|
||||||
drawFieldLabel(x, y, STR_SWITCH);
|
drawFieldLabel(x, y, STR_SWITCH);
|
||||||
drawSwitch(x, y, value, attr);
|
drawSwitch(x, y, value, attr);
|
||||||
|
|||||||
Reference in New Issue
Block a user