I’m not sure about what this setting is doing. My understanding is that a nonzero value in this field specifies the number of seconds the device will remain on after losing external power. The device will shut down after the specified number of seconds have elapsed.
I accidentally tried setting this value to 3600 (one hour) on a Heltec V3 that did not have a battery but that was plugged into external power continuously. The device shut down after one hour. The behavior is consistent, and if I set the value to zero the device stays on as long as it has external power.
Is this just a quirk because the device had no battery, or am I misunderstanding the function, or is this a bug?
it seems to me like if there’s USB plugged in, it shouldn’t even be looking at that config option. So perhaps there is a bug in the code that detects presence of USB.
If you enable debug logging, there should be a line in the log that looks like:
Surprise, only the NRF-based device correctly determines USB is connected. So, since your Heltec V3 device is ESP32-based, it looks like the current code thinks it has no USB connected, and so it will shut-down after that battery delay option has expired.
Ah, makes sense. I actually use this feature with a T-beam and it works as far as I can tell. I only happened to try it with the Heltec because I was copying settings.