X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fbbb_pin.c;h=7248c5abe97786ea139eaa9a2b44f0cebc005a77;hb=f858232d7c564f14e6d2fb9d616f8e12a1ec9171;hp=a652b97f4e12078f817f14863e7370e0d35abe0b;hpb=fad090011872a0dfe1431db94ecc66c3f9bee502;p=matches%2FMCTX3420.git diff --git a/server/bbb_pin.c b/server/bbb_pin.c index a652b97..7248c5a 100644 --- a/server/bbb_pin.c +++ b/server/bbb_pin.c @@ -272,7 +272,7 @@ bool ADC_Export(int pin) return true; } - sprintf(g_buffer, "%s/in_voltage%d_raw", g_options.adc_device_path, pin); + sprintf(g_buffer, "%s/in_voltage%d_raw", ADC_DEVICE_PATH, pin); g_adc[pin].fd_value = open(g_buffer, O_RDONLY); if (g_adc[pin].fd_value <0) { @@ -479,4 +479,11 @@ bool ADC_Read(int id, int *value) *value = strtol(adc_str, NULL, 10); return true; -} \ No newline at end of file +} + +#ifndef _BBB +//For running on systems that are not the BBB +bool True_Stub(void *arg, ...) { return true; } +bool ADC_Read_Stub(int *val, ...) { *val = 0; return true; } +bool GPIO_Read_Stub(bool *val, ...) { *val = false; return true; } +#endif