Merge pull request #85 from Callum-/dilatometer
[matches/MCTX3420.git] / server / bbb_pin.c
index 2ffc9e5..199706f 100644 (file)
@@ -334,6 +334,7 @@ void ADC_Unexport(int pin)
 /**
  * Set a GPIO pin
  * @param pin - The pin to set. MUST have been exported before calling this function.
+ * @param value - The value to set the GPIO pin to.
  */
 bool GPIO_Set(int pin, bool value)
 {
@@ -501,7 +502,8 @@ bool ADC_Read(int id, int *value)
 
        if (pread(g_adc[id].fd_value, adc_str, ADC_DIGITS-1, 0) == -1)
        {
-               AbortBool("ADC %d read failed: %s", id, strerror(errno));
+               //AbortBool("ADC %d read failed: %s", id, strerror(errno));
+               return false;
        }
 
        *value = strtol(adc_str, NULL, 10);

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