Skip to content

Commit

Permalink
J01:[wip] PR changes
Browse files Browse the repository at this point in the history
Signed-off-by: Soumya Subramanya <[email protected]>
  • Loading branch information
SNSubramanya committed Sep 29, 2023
1 parent 9665645 commit ebbee47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ void ChargePoint::on_session_finished(const int32_t evse_id, const int32_t conne
}

void ChargePoint::on_meter_value(const int32_t evse_id, const MeterValue& meter_value) {
std::lock_guard<std::mutex> lk(this->meter_value_mutex);
if (evse_id == 0) {
std::lock_guard<std::mutex> lk(this->meter_value_mutex);
// if evseId = 0 ten store in the chargepoint metervalues
this->meter_value = meter_value;
} else {
Expand Down Expand Up @@ -858,10 +858,10 @@ void ChargePoint::update_aligned_data_interval() {
const auto next_timestamp = this->get_next_clock_aligned_meter_value_timestamp(
this->device_model->get_value<int>(ControllerComponentVariables::AlignedDataInterval));
if (next_timestamp.has_value()) {
bool transaction_active = false;
EVLOG_debug << "Next meter value will be sent at: " << next_timestamp.value().to_rfc3339();
this->aligned_meter_values_timer.at(
[this, &transaction_active]() {
[this]() {
bool transaction_active = false;
for (auto const& [evse_id, evse] : this->evses) {
auto _meter_value = evse->get_meter_value();
// this will apply configured measurands and possibly reduce the entries of sampledValue
Expand Down

0 comments on commit ebbee47

Please sign in to comment.