265 } else { |
265 } else { |
266 t++; |
266 t++; |
267 #endif |
267 #endif |
268 } |
268 } |
269 |
269 |
|
270 #ifdef HAVE_WIRINGPI_H |
|
271 rc = piThreadCreate(my_units_loop); |
|
272 #else |
|
273 rc = pthread_create(&threads[t], NULL, my_units_loop, (void *)t ); |
|
274 #endif |
|
275 if (rc) { |
|
276 fprintf(stderr, "my_units_loop thread didn't start rc=%d\n", rc); |
|
277 syslog(LOG_NOTICE, "my_units_loop thread didn't start rc=%d", rc); |
|
278 #ifndef HAVE_WIRINGPI_H |
|
279 } else { |
|
280 t++; |
|
281 #endif |
|
282 } |
|
283 |
270 snprintf(buf, 1023, "tempA,tempB"); |
284 snprintf(buf, 1023, "tempA,tempB"); |
271 logger((char *)"thermferm.log", (char *)"thermferm", buf); |
285 logger((char *)"thermferm.log", (char *)"thermferm", buf); |
272 |
286 |
273 do { |
287 do { |
274 lcdupdate = FALSE; |
288 lcdupdate = FALSE; |