Skip to content

Commit

Permalink
Change the paths in the diff
Browse files Browse the repository at this point in the history
So that they can be run both for regular compile and cross compile
  • Loading branch information
shankari committed Jun 14, 2024
1 parent c22c4ca commit 964caaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions manager/libocpp.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -r -uw libocpp_unmod/lib/ocpp/v201/charge_point.cpp libocpp/lib/ocpp/v201/charge_point.cpp
--- libocpp_unmod/lib/ocpp/v201/charge_point.cpp 2024-06-11 14:29:41
+++ libocpp/lib/ocpp/v201/charge_point.cpp 2024-06-12 13:31:16
+++ lib/ocpp/v201/charge_point.cpp 2024-06-12 13:31:16
@@ -14,6 +14,7 @@
#include <string>

Expand Down Expand Up @@ -65,7 +65,7 @@ diff -r -uw libocpp_unmod/lib/ocpp/v201/charge_point.cpp libocpp/lib/ocpp/v201/c
Only in libocpp/lib/ocpp/v201: charge_point.cpp.orig
diff -r -uw libocpp_unmod/lib/ocpp/v201/messages/SetChargingProfile.cpp libocpp/lib/ocpp/v201/messages/SetChargingProfile.cpp
--- libocpp_unmod/lib/ocpp/v201/messages/SetChargingProfile.cpp 2024-06-11 14:29:41
+++ libocpp/lib/ocpp/v201/messages/SetChargingProfile.cpp 2024-06-12 12:25:48
+++ lib/ocpp/v201/messages/SetChargingProfile.cpp 2024-06-12 12:25:48
@@ -7,6 +7,15 @@
#include <optional>

Expand Down
19 changes: 10 additions & 9 deletions manager/ocpp201.module.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
diff -r -uw modules/OCPP201/OCPP201.cpp modules/OCPP201/OCPP201.cpp
--- modules/OCPP201/OCPP201.cpp 2024-06-11 22:16:13
+++ modules/OCPP201/OCPP201.cpp 2024-06-12 15:05:09
@@ -421,9 +421,11 @@
diff --git a/modules/OCPP201/OCPP201.cpp b/modules/OCPP201/OCPP201.cpp
index ca85975..4ba60fb 100644
--- a/modules/OCPP201/OCPP201.cpp
+++ b/modules/OCPP201/OCPP201.cpp
@@ -421,9 +421,11 @@ void OCPP201::ready() {
};

// Smart Charging support
Expand All @@ -13,7 +14,7 @@ diff -r -uw modules/OCPP201/OCPP201.cpp modules/OCPP201/OCPP201.cpp
this->set_external_limits(charging_schedules);
this->publish_charging_schedules(charging_schedules);
});
@@ -434,7 +436,7 @@
@@ -434,7 +436,7 @@ void OCPP201::ready() {
};

callbacks.signal_set_charging_profiles_callback = [this]() {
Expand All @@ -22,7 +23,7 @@ diff -r -uw modules/OCPP201/OCPP201.cpp modules/OCPP201/OCPP201.cpp
const auto charging_schedules =
this->charge_point->get_all_composite_charging_schedules(this->config.PublishChargingScheduleDurationS);
this->set_external_limits(charging_schedules);
@@ -577,6 +579,8 @@
@@ -577,6 +579,8 @@ void OCPP201::set_external_limits(const std::map<int32_t, ocpp::v201::CompositeS
// for each EVSE
for (auto const& [evse_id, schedule] : charging_schedules) {
types::energy::ExternalLimits limits;
Expand All @@ -31,12 +32,12 @@ diff -r -uw modules/OCPP201/OCPP201.cpp modules/OCPP201/OCPP201.cpp
std::vector<types::energy::ScheduleReqEntry> schedule_import;
for (const auto period : schedule.chargingSchedulePeriod) {
types::energy::ScheduleReqEntry schedule_req_entry;
@@ -597,7 +601,7 @@
@@ -597,7 +601,7 @@ void OCPP201::set_external_limits(const std::map<int32_t, ocpp::v201::CompositeS
limits.schedule_import.emplace(schedule_import);

// FIXME: Support EVSE ID 0
- EVLOG_debug << "OCPP sets the following external limits for EVSE " << evse_id << ": \n" << limits;
+ EVLOG_warning << "OCPP sets the following external limits for EVSE " << evse_id << " at index " << (evse_id -1) << " : \n" << limits;
this->r_evse_manager.at(evse_id-1)->call_set_external_limits(limits);
+ EVLOG_warning << "OCPP sets the following external limits for EVSE " << evse_id << " at index " << (evse_id -1) << " : \n" << limits;
this->r_evse_manager.at(evse_id - 1)->call_set_external_limits(limits);
}
}

0 comments on commit 964caaf

Please sign in to comment.