mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user