Send ADC values only in debug builds

This commit is contained in:
Thomas Kolb 2019-10-03 01:48:23 +02:00
parent 7dd084fe63
commit a1fb967d1b

View file

@ -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);