From 5446f340f9e0dfbe9f138caec94c7e915d30a9d4 Mon Sep 17 00:00:00 2001 From: Kawin Pechetratanapanit <39807451+kawinie@users.noreply.github.com> Date: Sun, 17 May 2026 19:24:32 -0700 Subject: [PATCH] feat(v2): add H1.0 INA226 config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HW1.0 has a 10 mΩ shunt --- include/v2/hal/ina226_power_monitor.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/v2/hal/ina226_power_monitor.h b/include/v2/hal/ina226_power_monitor.h index 584e4f5..769b7da 100644 --- a/include/v2/hal/ina226_power_monitor.h +++ b/include/v2/hal/ina226_power_monitor.h @@ -22,7 +22,14 @@ namespace pocketpd { void begin() override { m_driver.begin(); - m_driver.configure(0.005, 0.25, 50, 9970); + + #if HW_VERSION_MINOR == 0 + // current_zero_offset_mA may need to be adjusted + m_driver.configure(0.010, 0.25, 6.4, 9972); + #else + m_driver.configure(0.005, 0.25, 50, 9972); + #endif + m_driver.setAverage(INA226_4_SAMPLES); }