Add usleep to strain.c just in case...
authorSam Moore <[email protected]>
Wed, 30 Oct 2013 04:49:09 +0000 (12:49 +0800)
committerSam Moore <[email protected]>
Wed, 30 Oct 2013 04:49:09 +0000 (12:49 +0800)
Irrational fear of mutexes failing...

server/sensors/strain.c

index 7c78b56..64233e2 100644 (file)
@@ -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;

UCC git Repository :: git.ucc.asn.au