thermferm/thermferm.c

changeset 240
6bdda35b4a13
parent 238
a0f1deb65889
child 241
4ba138737bf4
equal deleted inserted replaced
239:793c09ece542 240:6bdda35b4a13
250 devices_list *device; 250 devices_list *device;
251 int tmp; 251 int tmp;
252 252
253 for (device = Config.devices; device; device = device->next) { 253 for (device = Config.devices; device; device = device->next) {
254 if (strcmp(address, device->uuid) == 0) { 254 if (strcmp(address, device->uuid) == 0) {
255 #ifdef HAVE_WIRINGPI_H
256 piLock(LOCK_DEVICES);
257 #endif
255 tmp = device->value + device->offset; 258 tmp = device->value + device->offset;
259 #ifdef HAVE_WIRINGPI_H
260 piUnlock(LOCK_DEVICES);
261 #endif
256 *val = tmp; 262 *val = tmp;
257 return device->present; 263 return device->present;
258 } 264 }
259 } 265 }
260 266

mercurial