From ec3b7b8d2389546ca8bcbefa5108a2d7e1f2afd2 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 16 Apr 2020 17:11:42 +0200 Subject: Disable DBG by default --- sw/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sw/main.cpp b/sw/main.cpp index 303f9a7..b18ef60 100644 --- a/sw/main.cpp +++ b/sw/main.cpp @@ -438,10 +438,12 @@ int main() const double i_shunt = (adc_voltage - 2.5) / (20.0 * R_SHUNT); capacity_accum += i_shunt * ltc2400_measure_interval.microsecs_ * 1e-6; +#if DEBUG_MEASUREMENT snprintf(timestamp_buf, sizeof(timestamp_buf), "DBG,%ldmV,%ldmA" ENDL, lrint((adc_voltage - 2.5) * 1e3), lrint(i_shunt * 1e3)); uart_puts(timestamp_buf); +#endif if (capacity_accum < 0) { capacity_accum = 0; } if (capacity_accum > MAX_CAPACITY) { capacity_accum = MAX_CAPACITY; } -- cgit v1.2.3