Charge sleep bug (#3177)

This commit is contained in:
Pezsma
2026-05-15 11:24:30 +02:00
committed by GitHub
parent 52ff442fcc
commit 95b2e9fbc3
+9
View File
@@ -551,6 +551,15 @@ bool I2cDev_MAX17055::setModelCfg(const uint8_t _Model_ID) {
}
bool I2cDev_MAX17055::setHibCFG(const uint16_t _Config) {
uint16_t config1_reg = read_register(0x1D);
// (SHDN: 0x80) and (COMMSH: 0x40) Otherwise it will go into sleep mode after 45 seconds.
config1_reg &= ~(0x0080 | 0x0040);
if (!write_register(0x1D, config1_reg)) {
return false;
}
return write_register(0xBA, _Config);
}