lhr-solar / BPS

Battery Protection System Code
MIT License
4 stars 2 forks source link

Fix Watchdog in Fault State #525

Closed manthanand closed 1 year ago

manthanand commented 1 year ago

If we do not pass the critical state, then the fault state breaks because it tries to reset the watchdog timer that wasn't initialized. But if we do pass the critical state and then fault, then we need to reset the watchdog timer. We should change it so that the BPS should only try and reset the watchdog timer if the timer has been initialized.