Update main.c fix wav_pos

beta-adc
Alan Johnston 2 years ago committed by GitHub
parent 7792f7e58d
commit f426f2e71b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2278,10 +2278,10 @@ void read_adc_process(int sig_num)
// read ADC
// printf("read_adc_process\n");
if (wav_position > (BUFFER_SIZE - 1)) {
wav_position++;
// reset to start
wav_position = 0;
} else {
// reset to start
wav_position = 0;
wav_position++;
}
adc_buffer[wav_position] = 0;
if(read(adc_file, data, 1) != 1)

Loading…
Cancel
Save

Powered by TurnKey Linux.