thermferm/panel.c

changeset 427
e8e548922e31
parent 426
e54611453d29
child 645
49eb753a958b
--- a/thermferm/panel.c	Thu Nov 19 21:17:26 2015 +0100
+++ b/thermferm/panel.c	Thu Nov 19 22:50:17 2015 +0100
@@ -49,6 +49,8 @@
 extern int		debug;
 extern int		setupmenu;
 extern uint16_t		keys;
+extern uint16_t		leds;
+extern int		slcdHandle;
 
 int			Key_Enter = FALSE;
 int			Key_Enter_Long = FALSE;
@@ -137,12 +139,20 @@
 		Key_Enter = TRUE;
 	    if (Enter > PRESS_LONG)
 		Key_Enter_Long = TRUE;
+	    if (Enter == PRESS_LONG) {
 #ifdef HAVE_WIRINGPI_H
-	    if (Enter == PRESS_LONG)
 		digitalWrite(PANEL_LED, 1);
-	    if (Enter == (PRESS_LONG + 10))
+#endif
+		leds |= SLED_TFLED;
+		slcdLEDs(slcdHandle);
+	    }
+	    if (Enter == (PRESS_LONG + 10)) {
+#ifdef HAVE_WIRINGPI_H
 		digitalWrite(PANEL_LED, 0);
 #endif
+		leds &= ~SLED_TFLED;
+		slcdLEDs(slcdHandle);
+	    }
 	}
 
 #ifdef HAVE_WIRINGPI_H

mercurial