Fixed initialisation of new GPIO RS433 and DHT11 devices.

Tue, 15 Sep 2015 14:50:35 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 15 Sep 2015 14:50:35 +0200
changeset 393
220f2f30bf68
parent 392
034746506c3d
child 394
14231379bec2

Fixed initialisation of new GPIO RS433 and DHT11 devices.

thermferm/devices.c file | annotate | diff | comparison | revisions
--- a/thermferm/devices.c	Tue Sep 15 14:44:21 2015 +0200
+++ b/thermferm/devices.c	Tue Sep 15 14:50:35 2015 +0200
@@ -563,7 +563,15 @@
 	    	ndev->subdevice = i;
 	    	ndev->gpiopin = pin;
 	    	ndev->timestamp = time(NULL);
-		if (i == PANEL_LED) {
+		if (i == 0) {
+		    ndev->direction = DEVDIR_INTERN;
+		    ndev->inuse = 1;
+		    ndev->comment = xstrcpy((char *)"RS433 Mhz transmitter");
+		} else if (i == 3) {
+		    ndev->direction = DEVDIR_INTERN;
+		    ndev->inuse = 1;
+		    ndev->comment = xstrcpy((char *)"DHT11 room sensor");
+		} else if (i == PANEL_LED) {
 		    ndev->direction = DEVDIR_OUT_BIN;
 		    ndev->inuse = 1;
 		    ndev->comment = xstrcpy((char *)"Frontpanel LED");

mercurial