added light sensor configuration to 1boot
This commit is contained in:
parent
5f584adb82
commit
f10cc6798e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue