@@ -68,14 +68,14 @@ void ArduinoOcppTask::initializeArduinoOcpp() {
6868
6969 ArduinoOcpp::FirmwareService *fwService = ArduinoOcpp::getFirmwareService ();
7070 if (fwService) {
71- fwService->setOnInstall ([lcd = lcd, &updateUserNotified = updateUserNotified, &updateUrl = updateUrl ](String location) {
71+ fwService->setOnInstall ([this ](String location) {
7272
7373 updateUrl = location;
7474
7575#if 0 //TODO finish when HTTP FW download will be available in the OpenEVSE core
7676
7777 //TODO HTTPUpdate has added the onProgress cb to its own class definition in Jun '21. Replace when available (https://github.com/espressif/arduino-esp32/commit/db4e7667afe0e169c5f00567f4b59ab8e0fc1532)
78- Update.onProgress([lcd = lcd, &updateUserNotified = updateUserNotified ](size_t index, size_t total) {
78+ Update.onProgress([this ](size_t index, size_t total) {
7979 if (!updateUserNotified && index > 0) {
8080 updateUserNotified = true;
8181
@@ -217,7 +217,7 @@ void ArduinoOcppTask::loadEvseBehavior() {
217217 * Report failures to central system. Note that the error codes are standardized in OCPP
218218 */
219219
220- addConnectorErrorCodeSampler ([evse = evse ] () {
220+ addConnectorErrorCodeSampler ([this ] () {
221221 if (evse->getEvseState () == OPENEVSE_STATE_GFI_FAULT ||
222222 evse->getEvseState () == OPENEVSE_STATE_NO_EARTH_GROUND ||
223223 evse->getEvseState () == OPENEVSE_STATE_DIODE_CHECK_FAILED) {
@@ -226,21 +226,21 @@ void ArduinoOcppTask::loadEvseBehavior() {
226226 return (const char *) NULL ;
227227 });
228228
229- addConnectorErrorCodeSampler ([evse = evse ] () {
229+ addConnectorErrorCodeSampler ([this ] () {
230230 if (evse->getEvseState () == OPENEVSE_STATE_OVER_TEMPERATURE) {
231231 return " HighTemperature" ;
232232 }
233233 return (const char *) NULL ;
234234 });
235235
236- addConnectorErrorCodeSampler ([evse = evse ] () {
236+ addConnectorErrorCodeSampler ([this ] () {
237237 if (evse->getEvseState () == OPENEVSE_STATE_OVER_CURRENT) {
238238 return " OverCurrentFailure" ;
239239 }
240240 return (const char *) NULL ;
241241 });
242242
243- addConnectorErrorCodeSampler ([evse = evse ] () {
243+ addConnectorErrorCodeSampler ([this ] () {
244244 if (evse->getEvseState () == OPENEVSE_STATE_STUCK_RELAY ||
245245 evse->getEvseState () == OPENEVSE_STATE_GFI_SELF_TEST_FAILED) {
246246 return " InternalError" ;
0 commit comments