Fixed compiling with wiringPi

Thu, 26 Nov 2015 22:52:48 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 26 Nov 2015 22:52:48 +0100
changeset 436
4df9ae3095f8
parent 435
4b1ed6897d80
child 437
5664743eaf2f

Fixed compiling with wiringPi

brewco/devices.c file | annotate | diff | comparison | revisions
--- a/brewco/devices.c	Thu Nov 26 22:47:42 2015 +0100
+++ b/brewco/devices.c	Thu Nov 26 22:52:48 2015 +0100
@@ -23,6 +23,7 @@
 #include "brewco.h"
 #include "devices.h"
 #include "xutil.h"
+#include "keyboard.h"
 
 
 extern int		debug;
@@ -136,10 +137,6 @@
     devices_list	*device;
     time_t		now, my_timestamp;
     int			rc, my_value, test_value;
-#ifdef HAVE_WIRINGPI_H
-    int			i;
-    char		buf[40];
-#endif
 
     if (uuid == NULL)
 	return 0;
@@ -170,25 +167,6 @@
 
 #ifdef HAVE_WIRINGPI_H
 		rc = 0;
-		if ((device->type == DEVTYPE_RC433) && (device->gpiopin != -1) && (device->present == DEVPRESENT_YES)) {
-		    snprintf(buf, 39, "%s,%d", device->address, value ? 1:0);
-		    for (i = 0; i < strlen(buf); i++)
-			if (buf[i] == '-')
-			    buf[i] = ',';
-		    piUnlock(LOCK_DEVICES);
-	    	    enableTransmit(device->gpiopin);	    
-		    rc = toggleSwitch(buf);
-		    disableTransmit();
-		    piLock(LOCK_DEVICES);
-		    syslog(LOG_NOTICE, "RC433 command %s rc=%d", buf, rc);
-		    if (debug)
-			fprintf(stdout, "RC433 command %s rc=%d\n", buf, rc);
-                    device->value = value;
-		    device->timestamp = time(NULL);
-		    piUnlock(LOCK_DEVICES);
-		    return rc;
-	        }
-
 		if ((device->type == DEVTYPE_GPIO) && (device->gpiopin != -1) && (device->present == DEVPRESENT_YES)) {
 
 		}
@@ -593,9 +571,6 @@
     char		*addr = NULL, line[60], *p = NULL;
     FILE		*fp;
     int			temp, rc;
-#ifdef HAVE_WIRINGPI_H
-    time_t		now;
-#endif
 
     syslog(LOG_NOTICE, "Thread my_devices_loop started");
 

mercurial