update bms-reset if statement to include a ntp offset

This commit is contained in:
laughingguffly 2025-02-03 12:43:03 +00:00
parent 147173bddd
commit eadb48bfa9

View file

@ -249,7 +249,7 @@ void handle_BMSpower() {
#ifdef PERIODIC_BMS_RESET
// Check if 24 hours have passed since the last power removal
if (currentTime - lastPowerRemovalTime >= powerRemovalInterval) {
if ((currentTime + bmsResetTimeOffset) - lastPowerRemovalTime >= powerRemovalInterval) {
start_bms_reset();
}
#endif //PERIODIC_BMS_RESET