645:49eb753a958b | 646:e3edc783006b |
---|---|
24 #include "devices.h" | 24 #include "devices.h" |
25 #include "rc-switch.h" | 25 #include "rc-switch.h" |
26 #include "panel.h" | 26 #include "panel.h" |
27 #include "xutil.h" | 27 #include "xutil.h" |
28 | 28 |
29 | |
30 int my_devices_state = 0; | |
29 | 31 |
30 extern sys_config Config; | 32 extern sys_config Config; |
31 extern int my_shutdown; | 33 extern int my_shutdown; |
32 extern pthread_mutex_t mutexes[5]; | 34 extern pthread_mutex_t mutexes[5]; |
33 | 35 |
728 int temp, rc; | 730 int temp, rc; |
729 #ifdef HAVE_WIRINGPI_H | 731 #ifdef HAVE_WIRINGPI_H |
730 time_t now; | 732 time_t now; |
731 #endif | 733 #endif |
732 | 734 |
735 my_devices_state = 1; | |
733 syslog(LOG_NOTICE, "Thread my_devices_loop started"); | 736 syslog(LOG_NOTICE, "Thread my_devices_loop started"); |
734 | 737 |
735 #ifdef HAVE_WIRINGPI_H | 738 #ifdef HAVE_WIRINGPI_H |
736 if ((rc = piHiPri(50))) | 739 if ((rc = piHiPri(50))) |
737 syslog(LOG_NOTICE, "my_devices_loop: piHiPri(50) rc=%d", rc); | 740 syslog(LOG_NOTICE, "my_devices_loop: piHiPri(50) rc=%d", rc); |
993 */ | 996 */ |
994 usleep(100000); | 997 usleep(100000); |
995 } | 998 } |
996 | 999 |
997 syslog(LOG_NOTICE, "Thread my_devices_loop stopped"); | 1000 syslog(LOG_NOTICE, "Thread my_devices_loop stopped"); |
1001 my_devices_state = 0; | |
998 return 0; | 1002 return 0; |
999 } | 1003 } |
1000 | 1004 |
1001 | 1005 |
1002 | 1006 |