47 profiles_list *current_profile = NULL; |
48 profiles_list *current_profile = NULL; |
48 float temp_temp = 20.0; |
49 float temp_temp = 20.0; |
49 #endif |
50 #endif |
50 |
51 |
51 #ifndef HAVE_WIRINGPI_H |
52 #ifndef HAVE_WIRINGPI_H |
52 pthread_t threads[4]; |
53 pthread_t threads[5]; |
53 #endif |
54 #endif |
54 extern const char UNITMODE[5][8]; |
55 extern const char UNITMODE[5][8]; |
55 extern const char PROFSTATE[4][6]; |
56 extern const char PROFSTATE[4][6]; |
56 |
57 |
57 |
58 |
884 #ifdef HAVE_WIRINGPI_H |
885 #ifdef HAVE_WIRINGPI_H |
885 rc = piThreadCreate(my_panel_loop); |
886 rc = piThreadCreate(my_panel_loop); |
886 if (rc) { |
887 if (rc) { |
887 fprintf(stderr, "my_panel_loop thread didn't start rc=%d\n", rc); |
888 fprintf(stderr, "my_panel_loop thread didn't start rc=%d\n", rc); |
888 syslog(LOG_WARNING, "my_panel_loop thread didn't start rc=%d", rc); |
889 syslog(LOG_WARNING, "my_panel_loop thread didn't start rc=%d", rc); |
|
890 } |
|
891 #endif |
|
892 |
|
893 |
|
894 #ifdef USE_SIMULATOR |
|
895 #ifdef HAVE_WIRINGPI_H |
|
896 rc = piThreadCreate(my_simulator_loop); |
|
897 #else |
|
898 rc = pthread_create(&threads[t], NULL, my_simulator_loop, (void *)t ); |
|
899 #endif |
|
900 if (rc) { |
|
901 fprintf(stderr, "my_simulator_loop thread didn't start rc=%d\n", rc); |
|
902 syslog(LOG_WARNING, "my_simulator_loop thread didn't start rc=%d", rc); |
|
903 #ifndef HAVE_WIRINGPI_H |
|
904 } else { |
|
905 t++; |
|
906 #endif |
889 } |
907 } |
890 #endif |
908 #endif |
891 |
909 |
892 /* |
910 /* |
893 * Initialize units for processing |
911 * Initialize units for processing |