Skip to content

Commit

Permalink
Add signed meter value support for periodic readings
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass committed Feb 19, 2024
1 parent ae0765c commit b311fd1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/OCPP201/OCPP201.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ void OCPP201::ready() {
get_meter_value(transaction_started.meter_value, ocpp::v201::ReadingContextEnum::Transaction_Begin,
transaction_started.signed_meter_value);
const auto session_id = session_event.uuid;
const auto signed_meter_value = transaction_started.signed_meter_value;
const auto reservation_id = transaction_started.reservation_id;
const auto remote_start_id = transaction_started.id_tag.request_id;

Expand Down Expand Up @@ -989,8 +988,8 @@ void OCPP201::ready() {
});

evse->subscribe_powermeter([this, evse_id](const types::powermeter::Powermeter& power_meter) {
const auto meter_value =
get_meter_value(power_meter, ocpp::v201::ReadingContextEnum::Sample_Periodic, std::nullopt);
const auto meter_value = get_meter_value(power_meter, ocpp::v201::ReadingContextEnum::Sample_Periodic,
power_meter.signed_meter_value);
this->charge_point->on_meter_value(evse_id, meter_value);
});

Expand Down

0 comments on commit b311fd1

Please sign in to comment.