aboutsummaryrefslogtreecommitdiffstats
path: root/sw/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sw/main.cpp')
-rw-r--r--sw/main.cpp2
1 files changed, 2 insertions, 0 deletions
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; }