diff --git a/main.c b/main.c index 4297527..33b38c7 100644 --- a/main.c +++ b/main.c @@ -59,12 +59,14 @@ static kiss_fft_cpx in[FFT_BUF_LEN], out[FFT_BUF_LEN]; typedef struct { + bool fft; uint8_t voltage_scale; uint8_t time_scale; uint8_t trigger_mode; } Options; Options options = { + .fft = false, // oscilloscope mode .voltage_scale = 4, // 2v .time_scale = 5, // 20us .trigger_mode = 1, // rising @@ -185,7 +187,7 @@ void capture_waveform(UArg arg1, UArg arg2) int32_t adc_current_index; int32_t i; - if (true) { + if (options.fft) { adc_current_index = gADCBufferIndex; int32_t j = 0; for(i=adc_current_index-FFT_BUF_LEN; i(b))?(a):(b)) #define CONSTRAIN(x) MAX(MIN(HEIGHT - 1, x), 0) - if(true) { // fft + if(options.fft) { // fft for(i=0; i