diff --git a/firmware/l0dable/1boot.c b/firmware/l0dable/1boot.c index 0b1c4df..75f9a00 100644 --- a/firmware/l0dable/1boot.c +++ b/firmware/l0dable/1boot.c @@ -21,6 +21,15 @@ static const struct MENU submenu_privacy={ "Privacy?", { {NULL,NULL} }}; +static void yellow(); +static void green(); +static const char colors[][12] = {"0-yellow","1-green"}; +bool color_set; +static const struct MENU submenu_color={ "r0ket color?", { + { colors[0], &yellow}, + { colors[1], &green}, + {NULL,NULL} +}}; void ram(void){ @@ -28,10 +37,16 @@ void ram(void){ menuflags|=(MENU_JUSTONCE|MENU_BIG); screen_intro(); while (again) { + color_set = false; + while (!color_set) { + handleMenu(&submenu_color); + } + privacy_set = false; while (!privacy_set) { handleMenu(&submenu_privacy); } + input("Nickname?", GLOBAL(nickname), 32, 127, MAXNICK-1); getInputWaitRelease(); again = screen_overview(); @@ -41,6 +56,18 @@ void ram(void){ saveConfig(); }; +static void green() { + GLOBAL(daytrig) = 155; + GLOBAL(daytrighyst) = 10; + color_set = true; +} + +static void yellow() { + GLOBAL(daytrig) = 160; + GLOBAL(daytrighyst) = 15; + color_set = true; +} + static void privacy0() { set_privacy(0); }