Make it actually compile...
authorSam Moore <[email protected]>
Wed, 9 Oct 2013 02:14:33 +0000 (10:14 +0800)
committerSam Moore <[email protected]>
Wed, 9 Oct 2013 02:14:33 +0000 (10:14 +0800)
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
server/sensor.h

index cc942e3..cfab514 100644 (file)
@@ -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");  
index 2e7bf4a..32e1e2d 100644 (file)
@@ -24,7 +24,7 @@ typedef enum SensorId
        PRESSURE1,
        PRESSURE_FEEDBACK,
        MICROPHONE,
-       ENCLOSURE.
+       ENCLOSURE,
        DILATOMETER
 } SensorId;
 

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