Tue, 29 Jul 2014 21:30:18 +0200
Code cleanup and fixes
mash/mash.c | file | annotate | diff | comparison | revisions | |
mash/mash.h | file | annotate | diff | comparison | revisions | |
mash/sensors.c | file | annotate | diff | comparison | revisions |
--- a/mash/mash.c Tue Jul 29 21:12:43 2014 +0200 +++ b/mash/mash.c Tue Jul 29 21:30:18 2014 +0200 @@ -25,19 +25,26 @@ #include "logger.h" #include "xutil.h" #include "beerxml.h" +#include "lcd-pcf8574.h" +#include "sensors.h" + #ifdef HAVE_WIRINGPI_H +/* wiringPi */ +#include <wiringPi.h> +#include <pcf8574.h> +#include <lcd.h> int tempA = 80; int tempB = 80; int coolerA = 0; int coolerB = 0; -bool my_shutdown = false; +int my_shutdown = FALSE; static pid_t pgrp, mypid; -extern bool debug; +extern int debug; extern sys_config Config; extern int lcdHandle; extern unsigned char lcdbuf[MAX_LCDS][20][4]; @@ -72,7 +79,7 @@ default: syslog(LOG_NOTICE, "die() on signal %d", onsig); } - my_shutdown = true; + my_shutdown = TRUE; } @@ -104,7 +111,7 @@ break; switch (c) { - case 'd': debug = true; + case 'd': debug = TRUE; break; case 'h': help(); return 1;
--- a/mash/mash.h Tue Jul 29 21:12:43 2014 +0200 +++ b/mash/mash.h Tue Jul 29 21:30:18 2014 +0200 @@ -68,12 +68,6 @@ -#ifdef HAVE_WIRINGPI_H - -PI_THREAD (my_sensors_loop); #endif - -#endif -
--- a/mash/sensors.c Tue Jul 29 21:12:43 2014 +0200 +++ b/mash/sensors.c Tue Jul 29 21:30:18 2014 +0200 @@ -21,11 +21,17 @@ *****************************************************************************/ #include "mash.h" +#include "xutil.h" + #ifdef HAVE_WIRINGPI_H +/* wiringPi */ +#include <wiringPi.h> +#include <pcf8574.h> +#include <lcd.h> -extern bool debug; +extern int debug; extern sys_config Config; extern int my_shutdown;