File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -168,24 +168,16 @@ bool DefaultChargePointEventsHandler::remoteStartTransactionRequested(unsigned i
168168{
169169 bool ret = false ;
170170 cout << " Remote start transaction : " << connector_id << " - " << id_tag << endl;
171- if (connector_id != 0 )
171+
172+ if (connector_id > m_config.ocppConfig ().numberOfConnectors () || connector_id == 0 )
172173 {
173- m_remote_start_pending[connector_id - 1u ] = true ;
174- m_remote_start_id_tag[connector_id - 1u ] = id_tag;
175- ret = true ;
174+ ret=false ;
176175 }
177176 else
178177 {
179- for (size_t i = 1 ; i <= m_config.ocppConfig ().numberOfConnectors (); i++)
180- {
181- if (m_chargepoint->getConnectorStatus (i) < ChargePointStatus::Charging)
182- {
183- m_remote_start_pending[i - 1u ] = true ;
184- m_remote_start_id_tag[i - 1u ] = id_tag;
185- ret = true ;
186- break ;
187- }
188- }
178+ m_remote_start_pending[connector_id - 1u ] = true ;
179+ m_remote_start_id_tag[connector_id - 1u ] = id_tag;
180+ ret=true ;
189181 }
190182 return ret;
191183}
You can’t perform that action at this time.
0 commit comments