From: Sam Moore Date: Wed, 9 Oct 2013 02:14:33 +0000 (+0800) Subject: Make it actually compile... X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=71c13fe3c04db7f93a69cbc6a6c7c3dc2393bf3f;p=matches%2FMCTX3420.git 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. --- 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;