Mon, 11 Aug 2014 11:09:23 +0200
Do not use 100% cpu on a system without devices
--- a/thermferm/devices.c Sun Aug 10 23:36:22 2014 +0200 +++ b/thermferm/devices.c Mon Aug 11 11:09:23 2014 +0200 @@ -500,6 +500,10 @@ */ usleep(10000); } + /* + * Delay a bit after all devices + */ + usleep(100000); } syslog(LOG_NOTICE, "Thread my_devices_loop stopped");
--- a/thermferm/thermferm.c Sun Aug 10 23:36:22 2014 +0200 +++ b/thermferm/thermferm.c Mon Aug 11 11:09:23 2014 +0200 @@ -89,7 +89,7 @@ } - +#ifdef HAVE_WIRINGPI_H void go_menu(int menu) { mb_lcdClear(lcdHandle); @@ -178,7 +178,6 @@ -#ifdef HAVE_WIRINGPI_H void stopLCD(void) { mb_lcdClear(lcdHandle);
--- a/thermferm/thermferm.h Sun Aug 10 23:36:22 2014 +0200 +++ b/thermferm/thermferm.h Mon Aug 11 11:09:23 2014 +0200 @@ -44,6 +44,7 @@ #include <pcf8574.h> #include <lcd.h> + #define MENU_NONE 0 #define MENU_TOP_DEFAULT 1 #define MENU_TOP_UNITS 2 @@ -70,8 +71,8 @@ #define MENU_SYS_MASH 33 #define MENU_SYS_THERMS 34 +#endif -#endif #define TRUE 1 #define FALSE 0