@Rftop ,
The good news is that I am doing all this work in my home office as I do not have any devices in the field with this release. As my father (almost) said “Test twice, deploy once”.
To test this I take the LiPO and discharge it using my LiPO battery station. I typically discharge it to 3.77V (30% SoC) as this is my Low Battery threshold. I then put that battery on a test device and power it on leaving it connected until it reports a value of less than 30% SoC and goes into low battery mode. I Then charge the device through the Vin pin using my bench top power supply set to 6V and up to 900mA. I can tell when the battery is approaching a nominal charge by watching the current supplied drop. Then, I wait for the top of the hour and see what happens. If the device fails to connect, I can bring it on-line and see all the cached messages. Does this make sense?
I am fairly certain this is new behavior with deviceOS@2.2.0 as the low battery code worked in the previous release. I am less certain that the “unlimited reconnect time” issue is new or if I am only now coming to realize it. It was simply luck that I had my serial monitor connected when a device had a reconnection event.
As for the LTS approach, I do think that this approach has made life better. There are a couple new features I would love to see in the next LTS release but agree it needs to be very stable or it looses its reason for existence.
I am currently testing this approach - suggested by you - to look at VCell if a low battery state is called. The code looks like this and it comes right after the low battery value is set:
if (sysStatus.lowBatteryMode) { // Need to take these steps
Log.info("Double checking our answers");
fuelGauge.wakeup(); // Make sure the fuelGauge is woke
delay(500);
if (fuelGauge.getVCell() >= 3.77) { // Correcponds to 30% SoC - https://blog.ampow.com/lipo-voltage-chart/
Log.info("Did not pass the smell test, vCell is %4.2f clearing low battery mode", fuelGauge.getVCell());
sysStatus.lowBatteryMode = false;
sysStatus.stateOfCharge = int(fuelGauge.getSoC()); // Might as well update the SoC as well - let's see
}
}
I will know in the next hour or so if it solves the problem.
Thanks,
Chip