From a1fb967d1bac98d31bd07dfc1e357db8d70232c5 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Thu, 3 Oct 2019 01:48:23 +0200 Subject: [PATCH] Send ADC values only in debug builds --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index a987bbe..cc1cdf0 100644 --- a/src/main.c +++ b/src/main.c @@ -702,6 +702,7 @@ int main(void) while(!dma_get_interrupt_flag(DMA1, DMA_CHANNEL1, DMA_TCIF) && wait_frame); dma_clear_interrupt_flags(DMA1, DMA_CHANNEL1, DMA_TCIF); +#ifdef DEBUG if(timebase_ms % 250 == 0) { debug_send_string("ADC: "); for(int i = 0; i < ADC_NUM_CHANNELS; i++) { @@ -711,6 +712,7 @@ int main(void) } debug_send_string("\r\n"); } +#endif // convert read values power_state.vin = fxp_mult(fxp_from_int(adc_values[0]), VIN_SCALE);