thermferm/panel.c

changeset 229
5f93b61adb34
parent 228
11655e7124c5
child 238
a0f1deb65889
equal deleted inserted replaced
228:11655e7124c5 229:5f93b61adb34
26 26
27 27
28 #ifdef HAVE_WIRINGPI_H 28 #ifdef HAVE_WIRINGPI_H
29 29
30 30
31 /*
32 * 10 Milliseconds counts for a key to be short or long pressed.
33 */
34 #define PRESS_NORMAL 5
35 #define PRESS_LONG 200
36
37 /*
38 * LCD timeout in seconds
39 */
40 #define LCD_SLEEP 120
41
42 /*
43 * Menu timeout in seconds
44 */
45 #define MENU_TIMEOUT 60
46
47
48
31 extern int my_shutdown; 49 extern int my_shutdown;
32 extern int debug; 50 extern int debug;
33 extern int setupmenu; 51 extern int setupmenu;
34 52
35 int Key_Enter = FALSE; 53 int Key_Enter = FALSE;
38 int Key_Down = FALSE; 56 int Key_Down = FALSE;
39 57
40 int previous_key = KEY_NONE; 58 int previous_key = KEY_NONE;
41 int menutimer = 0; 59 int menutimer = 0;
42 60
61
62 int keypressed(void);
43 63
44 64
45 /* 65 /*
46 * Check for a key. Return last pressed key or none. 66 * Check for a key. Return last pressed key or none.
47 */ 67 */
172 */ 192 */
173 usleep(10000); 193 usleep(10000);
174 } 194 }
175 195
176 syslog(LOG_NOTICE, "Thread my_panel_loop stopped"); 196 syslog(LOG_NOTICE, "Thread my_panel_loop stopped");
177 if (debug)
178 fprintf(stdout, "Thread my_panel_loop stopped\n");
179
180 return 0; 197 return 0;
181 } 198 }
182 199
183 200
184 #endif 201 #endif

mercurial