thermferm/slcd.c

changeset 427
e8e548922e31
parent 426
e54611453d29
child 484
7362ebd40f26
--- a/thermferm/slcd.c	Thu Nov 19 21:17:26 2015 +0100
+++ b/thermferm/slcd.c	Thu Nov 19 22:50:17 2015 +0100
@@ -31,6 +31,7 @@
 int			sock = -1;
 uint16_t		keys = 0x0000;
 uint16_t		leds = 0x0400;	/* LED's, buzzer, LCD backlight	*/
+uint16_t		oleds = 0x0400;
 
 extern int		debug;
 
@@ -81,7 +82,9 @@
 
 void slcdLEDs(int fd)
 {
-    putLCDsocket(fd, leds);
+    if (leds != oleds)
+	putLCDsocket(fd, leds);
+    oleds = leds;
 }
 
 

mercurial