From 6bc90047ed36b392d90a1bf778baf9687b835f2d Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Wed, 30 Oct 2013 12:49:09 +0800 Subject: [PATCH] Add usleep to strain.c just in case... Irrational fear of mutexes failing... --- server/sensors/strain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/sensors/strain.c b/server/sensors/strain.c index 7c78b56..64233e2 100644 --- a/server/sensors/strain.c +++ b/server/sensors/strain.c @@ -119,6 +119,9 @@ bool Strain_Read(int id, double * value) if (!GPIO_Set(gpio_num, false)) Fatal("Couldn't set GPIO%d for strain sensor %d to LOW (after reading)", gpio_num, id); + + usleep(200); + pthread_mutex_unlock(&mutex); return result; -- 2.20.1