# HG changeset patch # User Michiel Broek # Date 1407748163 -7200 # Node ID 5ad534c79a2263a8ec308f06b8b726d1791772b6 # Parent 37d1eb0e1d66cab263dd178af9a0cec9b926a101 Do not use 100% cpu on a system without devices diff -r 37d1eb0e1d66 -r 5ad534c79a22 thermferm/devices.c --- 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"); diff -r 37d1eb0e1d66 -r 5ad534c79a22 thermferm/thermferm.c --- 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); diff -r 37d1eb0e1d66 -r 5ad534c79a22 thermferm/thermferm.h --- 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 #include + #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