From e3f2467b915eb9bf4c0388f261775fb3e51e7640 Mon Sep 17 00:00:00 2001 From: ksschwabe Date: Fri, 1 Jan 2016 17:40:52 +0100 Subject: [PATCH] batt_smbus: Commentted out button press detection The button press detection relies on reading the MANUFACTURER_DATA register. The implementation of what information is returned when reading this register differs from manufacturer to manufacturer. This has been commented out until an elegant solution can be found to detect the battery shutdown on different batteries manufactured by different manufacturers. --- src/drivers/batt_smbus/batt_smbus.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/batt_smbus/batt_smbus.cpp b/src/drivers/batt_smbus/batt_smbus.cpp index c6b5057062..31b9c72913 100644 --- a/src/drivers/batt_smbus/batt_smbus.cpp +++ b/src/drivers/batt_smbus/batt_smbus.cpp @@ -451,6 +451,7 @@ BATT_SMBUS::cycle() } } + /* // read the button press indicator if (read_block(BATT_SMBUS_MANUFACTURER_DATA, buff, 6, false) == 6) { bool pressed = (buff[1] >> 3) & 0x01; @@ -471,6 +472,7 @@ BATT_SMBUS::cycle() new_report.is_powering_off = false; } } + */ // publish to orb if (_batt_topic != -1) {