From 71c13fe3c04db7f93a69cbc6a6c7c3dc2393bf3f Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Wed, 9 Oct 2013 10:14:33 +0800 Subject: [PATCH] Make it actually compile... Whoops. Um, the fatal error on the strain gauges occurs after a couple of seconds. Need to think more carefully about that. --- server/sensor.c | 8 ++++---- server/sensor.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/sensor.c b/server/sensor.c index cc942e3..cfab514 100644 --- a/server/sensor.c +++ b/server/sensor.c @@ -212,25 +212,25 @@ bool Sensor_Read(Sensor * s, DataPoint * d) //TODO: Strain gauges should have their own critical section, rest of sensors probably don't need to be in a critical section case STRAIN0: success &= GPIO_Set(GPIO0_30, true); - success &= ADC_Read(ADC0); + success &= ADC_Read(ADC0, &value); success &= GPIO_Set(GPIO0_30, false); if (!success) Fatal("Error reading strain gauge 0"); break; case STRAIN1: success &= GPIO_Set(GPIO1_28, true); - success &= ADC_Read(ADC0); + success &= ADC_Read(ADC0, &value); success &= GPIO_Set(GPIO1_28, false); if (!success) Fatal("Error reading strain gauge 1"); break; case STRAIN2: success &= GPIO_Set(GPIO0_31, true); - success &= ADC_Read(ADC0); + success &= ADC_Read(ADC0, &value); success &= GPIO_Set(GPIO0_31, false); case STRAIN3: success &= GPIO_Set(GPIO1_16, true); - success &= ADC_Read(ADC0); + success &= ADC_Read(ADC0, &value); success &= GPIO_Set(GPIO1_16, false); if (!success) Fatal("Error reading strain gauge 2"); diff --git a/server/sensor.h b/server/sensor.h index 2e7bf4a..32e1e2d 100644 --- a/server/sensor.h +++ b/server/sensor.h @@ -24,7 +24,7 @@ typedef enum SensorId PRESSURE1, PRESSURE_FEEDBACK, MICROPHONE, - ENCLOSURE. + ENCLOSURE, DILATOMETER } SensorId; -- 2.20.1