From ce4577da09d2a053553482e536610a9394dd69a8 Mon Sep 17 00:00:00 2001 From: uhi22 Date: Sun, 16 Apr 2023 21:21:04 +0200 Subject: [PATCH] fix: longer timeout for PowerDeliveryResponse, to fit to compleo charger behavior --- fsmPev.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fsmPev.py b/fsmPev.py index 143be06..d7c5921 100644 --- a/fsmPev.py +++ b/fsmPev.py @@ -128,11 +128,13 @@ class fsmPev(): def isTooLong(self): # The timeout handling function. - limit = 30 # number of call cycles until timeout + limit = 33 # number of call cycles until timeout. Default 33 cycles with 30ms, means approx. 1 second. if (self.state==stateWaitForCableCheckResponse): - limit = 30*30 # CableCheck may need some time. Wait at least 30s. + limit = 30*33 # CableCheck may need some time. Wait at least 30s. if (self.state==stateWaitForPreChargeResponse): - limit = 30*30 # PreCharge may need some time. Wait at least 30s. + limit = 30*33 # PreCharge may need some time. Wait at least 30s. + if (self.state==stateWaitForPowerDeliveryResponse): + limit = 5*33 # PowerDelivery may need some time. Wait at least 5s. On Compleo charger, observed more than 1s until response. return (self.cyclesInState > limit) def stateFunctionNotYetInitialized(self):