# HG changeset patch # User Michiel Broek # Date 1450729276 -3600 # Node ID e8203e891b0e75b3bda49894c9f8d135434d0d9e # Parent f4d75ef899f46dc8747b5554858d87f4d89d0157 Removed LCD auto dim mode, the display is allways on if this program runs. diff -r f4d75ef899f4 -r e8203e891b0e brewco/brewco.c --- a/brewco/brewco.c Mon Dec 21 21:09:36 2015 +0100 +++ b/brewco/brewco.c Mon Dec 21 21:21:16 2015 +0100 @@ -663,7 +663,8 @@ */ usleep(1500000); prompt(0, NULL); -// stopLCD(); + setBacklight(0); + if (sock != -1) { if (shutdown(sock, SHUT_RDWR)) { syslog(LOG_NOTICE, "Can't shutdown socket: %s", strerror(errno)); diff -r f4d75ef899f4 -r e8203e891b0e brewco/keyboard.c --- a/brewco/keyboard.c Mon Dec 21 21:09:36 2015 +0100 +++ b/brewco/keyboard.c Mon Dec 21 21:21:16 2015 +0100 @@ -33,16 +33,6 @@ #define PRESS_NORMAL 5 #define PRESS_LONG 200 -/* - * LCD timeout in seconds - */ -#define LCD_SLEEP 120 - -/* - * Menu timeout in seconds - */ -#define MENU_TIMEOUT 60 - extern int my_shutdown; @@ -58,7 +48,6 @@ int Key_Down = FALSE; int previous_key = KEY_NONE; -int menutimer = 0; int keypressed(void); @@ -128,7 +117,7 @@ void *my_keyboard_loop(void *threadid) #endif { - int Return = 0, Enter = 0, Up = 0, Down = 0, Backlight = LCD_SLEEP, AnyKey = FALSE; + int Return = 0, Enter = 0, Up = 0, Down = 0; time_t Last = (time_t)0, Now; #ifdef HAVE_WIRINGPI_H @@ -201,45 +190,9 @@ Key_Down = TRUE; } - if (Key_Enter || Key_Return || Key_Up || Key_Down) { - AnyKey = TRUE; - /* - * Any key is pressed. - */ -#ifdef HAVE_WIRINGPI_H - piLock(LOCK_LCD); -#endif - setBacklight(1); -#ifdef HAVE_WIRINGPI_H - piUnlock(LOCK_LCD); -#endif - Backlight = LCD_SLEEP; - menutimer = 0; - } else { - /* - * No key pressed. - */ - AnyKey = FALSE; - } - Now = time(NULL); if (Now != Last) { Last = Now; - - if (AnyKey == FALSE) { - if (Backlight == 1) { -#ifdef HAVE_WIRINGPI_H - piLock(LOCK_LCD); -#endif - setBacklight(0); -#ifdef HAVE_WIRINGPI_H - piUnlock(LOCK_LCD); -#endif - } - if (Backlight > 0) { - Backlight--; - } - } } /*