thermferm/panel.c

changeset 244
2f868eaefec2
parent 241
4ba138737bf4
child 422
13502d0dda65
equal deleted inserted replaced
243:ab75ff8e26e1 244:2f868eaefec2
47 47
48 48
49 extern int my_shutdown; 49 extern int my_shutdown;
50 extern int debug; 50 extern int debug;
51 extern int setupmenu; 51 extern int setupmenu;
52 extern units_list *current_unit;
53 52
54 int Key_Enter = FALSE; 53 int Key_Enter = FALSE;
55 int Key_Enter_Long = FALSE; 54 int Key_Enter_Long = FALSE;
56 int Key_Up = FALSE; 55 int Key_Up = FALSE;
57 int Key_Down = FALSE; 56 int Key_Down = FALSE;
182 } 181 }
183 if (Backlight > 0) { 182 if (Backlight > 0) {
184 Backlight--; 183 Backlight--;
185 } 184 }
186 185
186 piLock(LOCK_MENU);
187 if (setupmenu != MENU_NONE) { 187 if (setupmenu != MENU_NONE) {
188 if (menutimer < MENU_TIMEOUT) 188 if (menutimer < MENU_TIMEOUT)
189 menutimer++; 189 menutimer++;
190 else { 190 else {
191 setupmenu = MENU_NONE; 191 setupmenu = MENU_NONE;
192 if (current_unit)
193 free(current_unit);
194 current_unit = NULL;
195 } 192 }
196 } 193 }
194 piUnlock(LOCK_MENU);
197 } 195 }
198 } 196 }
199 197
200 /* 198 /*
201 * Loop 10 milliseconds 199 * Loop 10 milliseconds

mercurial