-
- //Log(LOGDEBUG, "Called for pin %d", id);
- char adc_val[ADC_DIGITS] = "";
- rewind(g_adc[id].file_value);
- fgets(adc_val, sizeof(adc_val)/sizeof(char), g_adc[id].file_value);
- for(int i = ADC_DIGITS-1; i > 0; --i)
+ char adc_str[ADC_DIGITS] = "";
+ lseek(g_adc[id].fd_value, 0, SEEK_SET);
+
+ int i = 0;
+ for (i = 0; i < ADC_DIGITS-1; ++i)