Skip to content

Commit 75b44b6

Browse files
Merge pull request #747 from matth-x/master
Update OCPP lib, fix building on Windows
2 parents bab549e + 5be43d0 commit 75b44b6

File tree

7 files changed

+262
-160
lines changed

7 files changed

+262
-160
lines changed

platformio.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ lib_deps =
3838
jeremypoulter/[email protected]
3939
jeremypoulter/[email protected]
4040
jeremypoulter/[email protected]
41-
42-
matth-x/ArduinoOcppMongoose@0.1.0
43-
lib_ignore = WebSockets ; ArduinoOcpp: don't compile built-in WS library
41+
42+
matth-x/MicroOcppMongoose@1.1.0
43+
lib_ignore = WebSockets ; MicroOcpp: don't compile built-in WS library
4444
extra_scripts =
4545
pre:scripts/auto_fw_version.py
4646
scripts/extra_script.py
@@ -87,11 +87,11 @@ build_flags =
8787
-D MG_ENABLE_SNTP=1
8888
#-D ENABLE_DEBUG_MICROTASKS
8989
-D CS_PLATFORM=CS_P_ESP32
90-
-D AO_CUSTOM_WS ; ArduinoOcpp: don't use built-in WS library
91-
-D AO_CUSTOM_CONSOLE ; ArduinoOcpp: use custom debug out
92-
-D AO_DBG_LEVEL=AO_DL_INFO
93-
-D AO_MG_VERSION_614 ; use MG v6.14
94-
-D AO_CA_CERT_LOCAL ; manage certificate locally
90+
-D MO_CUSTOM_WS ; MicroOcpp: don't use built-in WS library
91+
-D MO_CUSTOM_CONSOLE ; MicroOcpp: use custom debug out
92+
-D MO_DBG_LEVEL=MO_DL_INFO
93+
-D MO_TRAFFIC_OUT
94+
-D MO_MG_VERSION_614 ; use MG v6.14
9595
#-D ENABLE_DEBUG
9696
#-D ENABLE_DEBUG_MONGOOSE_HTTP_CLIENT
9797
-D RAPI_MAX_COMMANDS=20

scripts/extra_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def make_static(env, target, source, prefix, files_dir):
126126
for out_file in out_files:
127127
filetype = None
128128
compress = out_file.endswith(".gz")
129+
out_file = out_file.replace("\\","/") # Windows: out_file generated with \ as directory separator
129130
if out_file.endswith(".css") or out_file.endswith(".css.gz"):
130131
filetype = "CSS"
131132
elif out_file.endswith(".js") or out_file.endswith(".js.gz"):

src/app_config.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,12 @@ void config_changed(String name)
357357
emoncms_updated = true;
358358
}
359359
timeManager.setSntpEnabled(config_sntp_enabled());
360-
ArduinoOcppTask::notifyConfigChanged();
360+
OcppTask::notifyConfigChanged();
361361
evse.setSleepForDisable(!config_pause_uses_disabled());
362362
} else if(name.startsWith("mqtt_")) {
363363
mqtt_restart();
364364
} else if(name.startsWith("ocpp_")) {
365-
ArduinoOcppTask::notifyConfigChanged();
365+
OcppTask::notifyConfigChanged();
366366
} else if(name.startsWith("emoncms_")) {
367367
emoncms_updated = true;
368368
} else if(name.startsWith("scheduler_")) {

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ String currentfirmware = ESCAPEQUOTE(BUILD_TAG);
8989
String buildenv = ESCAPEQUOTE(BUILD_ENV_NAME);
9090
String serial;
9191

92-
ArduinoOcppTask ocpp = ArduinoOcppTask();
92+
OcppTask ocpp = OcppTask();
9393

9494

9595
static void hardware_setup();

0 commit comments

Comments
 (0)