Skip to content

Commit

Permalink
If the status of the Connecter is not Charging before StopTransaction…
Browse files Browse the repository at this point in the history
…, maybe skip sendMeterValues in the function processSampled; such as SuspendedEV
  • Loading branch information
WangLibo committed Feb 20, 2025
1 parent d64f056 commit 50a8fc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chargepoint/metervalues/MeterValuesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void MeterValuesManager::processSampled(unsigned int connector_id)

// Get connector
Connector* connector = m_connectors.getConnector(connector_id);
if (connector)
if (connector && connector->status == ocpp::types::ChargePointStatus::Charging)
{
// Send sampled meter values
sendMeterValues(connector->id, measurands, ReadingContext::SamplePeriodic, connector->transaction_id);
Expand Down

0 comments on commit 50a8fc2

Please sign in to comment.