Skip to content

Commit

Permalink
fix WASM integration Configs
Browse files Browse the repository at this point in the history
  • Loading branch information
matth-x committed Nov 5, 2023
1 parent 0d1e5a2 commit b6872bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/net_wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ extern "C" char* mocpp_wasm_api_call(const char *endpoint, const char *method, c
}
wasm_ocpp_connection_instance->reloadConfigs();
if (request.containsKey("pingInterval")) {
*webSocketPingInterval = request["pingInterval"] | 0;
webSocketPingInterval->setInt(request["pingInterval"] | 0);
}
if (request.containsKey("reconnectInterval")) {
*reconnectInterval = request["reconnectInterval"] | 0;
reconnectInterval->setInt(request["reconnectInterval"] | 0);
}
if (request.containsKey("dnsUrl")) {
MO_DBG_WARN("dnsUrl not implemented");
Expand All @@ -428,8 +428,8 @@ extern "C" char* mocpp_wasm_api_call(const char *endpoint, const char *method, c
response["chargeBoxId"] = wasm_ocpp_connection_instance->getChargeBoxId();
response["authorizationKey"] = wasm_ocpp_connection_instance->getAuthKey();

response["pingInterval"] = webSocketPingInterval ? (int) *webSocketPingInterval : 0;
response["reconnectInterval"] = reconnectInterval ? (int) *reconnectInterval : 0;
response["pingInterval"] = webSocketPingInterval ? webSocketPingInterval->getInt() : 0;
response["reconnectInterval"] = reconnectInterval ? reconnectInterval->getInt() : 0;
serializeJson(response, wasm_resp_buf, MO_WASM_RESP_BUF_SIZE);
return wasm_resp_buf;
}
Expand Down

0 comments on commit b6872bf

Please sign in to comment.