File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -811,7 +811,7 @@ void setState(uint8_t NewState) { //c
811811 switch (NewState) {
812812 case STATE_B1:
813813 if (!ChargeDelay) setChargeDelay (3 ); // When entering State B1, wait at least 3 seconds before switching to another state.
814- if (State != STATE_B1 && !PilotDisconnected) {
814+ if (State != STATE_B1 && !PilotDisconnected && AccessStatus == ON ) { // Don't disconnect Pilot when switching to OFF or PAUSE
815815 PILOT_DISCONNECTED;
816816 PilotDisconnected = true ;
817817 PilotDisconnectTime = 5 ; // Set PilotDisconnectTime to 5 seconds
@@ -3064,11 +3064,7 @@ void Timer10ms_singlerun(void) {
30643064 if (State == STATE_A || State == STATE_COMM_B || State == STATE_B1) {
30653065 // When the pilot line is disconnected, wait for PilotDisconnectTime, then reconnect
30663066 if (PilotDisconnected) {
3067- #ifdef SMARTEVSE_VERSION // ESP32 v3
3068- if (PilotDisconnectTime == 0 && pilot == PILOT_SHORT ) { // Pilot should be ~ 0V when disconnected
3069- #else // CH32
3070- if (PilotDisconnectTime == 0 && pilot == PILOT_3V ) { // Pilot should be ~ 3V when disconnected TODO is this ok?
3071- #endif
3067+ if (PilotDisconnectTime == 0 ) { // Pilot is floating, don't check voltage as it could be anything
30723068 PILOT_CONNECTED;
30733069 PilotDisconnected = false ;
30743070 _LOG_A (" Pilot Connected\n " );
You can’t perform that action at this time.
0 commit comments