[BUG]Error compiling on ESP170.cpp
Engineer2Designer opened this issue · comments
Describe the bug
To Reproduce
- Go to compiling
- on 'esp3d/src/core/commands/ESP170.cpp: In lambda function:'
- See error
compiling log
Processing esp32cam (platform: espressif32@6.0.1; board: esp32dev; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose
option
Check if need to add some library to path
['C:\Users\E2D\Documents\PlatformIO\Projects\ESP3D-e2d\libraries', '$PROJECT_LIBDEPS_DIR\$PIOENV', 'C:\Users\E2D\.platformio\lib']
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.0.1) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)PACKAGES:
- framework-arduinoespressif32 @ 3.20006.221224 (2.0.6)
- tool-esptoolpy @ 1.40400.0 (4.4.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Converting esp3d.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 42 compatible libraries
Scanning dependencies...
Dependency Graph
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- Preferences @ 2.0.0
|-- WebServer @ 2.0.0
|-- BluetoothSerial @ 2.0.0
|-- Ticker @ 2.0.0
|-- Wire @ 2.0.0
|-- ESP8266 and ESP32 OLED driver for SSD1306 displays @ 4.3.0
|-- TFT_eSPI @ 2.4.72
|-- FS @ 2.0.0
|-- SD @ 2.0.0
|-- SPI @ 2.0.0
|-- FFat @ 2.0.0
|-- LittleFS @ 2.0.0
|-- SPIFFS @ 2.0.0
|-- SD_MMC @ 2.0.0
|-- ESP32SSDP @ 1.2.0
|-- Update @ 2.0.0
|-- ESP8266-Arduino-Lua @ 0.0.30
|-- ESPmDNS @ 2.0.0
|-- ArduinoOTA @ 2.0.0
|-- DNSServer @ 2.0.0
|-- HTTPClient @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
|-- BMx280MI @ 1.2.0
|-- DHT sensor library for ESPx @ 1.0.6
|-- WebSockets @ 2.3.6
|-- Ethernet @ 2.0.0
Building in release mode
Compiling .pioenvs\esp32cam\src\esp3d.ino.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP0.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP100.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP101.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP102.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP103.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP104.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP105.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP106.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP107.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP108.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP110.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP111.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP112.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP114.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP115.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP120.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP121.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP130.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP131.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP140.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP150.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP160.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP161.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP170.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP171.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP180.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP181.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP190.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP191.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP200.cpp.o
Compiling .pioenvs\esp32cam\src\src\core\commands\ESP201.cpp.o
esp3d/src/core/commands/ESP170.cpp: In lambda function:
esp3d/src/core/commands/ESP170.cpp:36:27: error: expected '{' before '=' token
const char* camcmd = [] = {
^
esp3d/src/core/commands/ESP170.cpp: In member function 'void ESP3DCommands::ESP170(int, ESP3DMessage*)':
esp3d/src/core/commands/ESP170.cpp:65:3: error: no match for 'operator=' (operand types are 'ESP3DCommands::ESP170(int, ESP3DMessage*)::<lambda()>' and '')
};
^
esp3d/src/core/commands/ESP170.cpp:36:25: note: candidate: 'ESP3DCommands::ESP170(int, ESP3DMessage*)::<lambda()>& ESP3DCommands::ESP170(int, ESP3DMessage*)::<lambda()>::operator=(const ESP3DCommands::ESP170(int, ESP3DMessage*)::<lambda()>&)'
const char* camcmd = [] = {
^
esp3d/src/core/commands/ESP170.cpp:36:25: note: no known conversion for argument 1 from '' to 'const ESP3DCommands::ESP170(int, ESP3DMessage*)::<lambda()>&'
esp3d/src/core/commands/ESP170.cpp:79:5: error: 'hasError' was not declared in this scope
hasError = true;
^~~~~~~~
esp3d/src/core/commands/ESP170.cpp:79:5: note: suggested alternative: 'strerror'
hasError = true;
^~~~~~~~
strerror
esp3d/src/core/commands/ESP170.cpp:80:5: error: 'error_msg' was not declared in this scope
error_msg = "No camera initialized";
^~~~~~~~~
esp3d/src/core/commands/ESP170.cpp:80:5: note: suggested alternative: 'error_t'
error_msg = "No camera initialized";
^~~~~~~~~
error_t
esp3d/src/core/commands/ESP170.cpp:86:7: error: 'hasError' was not declared in this scope
hasError = true;
^~~~~~~~
esp3d/src/core/commands/ESP170.cpp:86:7: note: suggested alternative: 'strerror'
hasError = true;
^~~~~~~~
strerror
esp3d/src/core/commands/ESP170.cpp:87:7: error: 'error_msg' was not declared in this scope
error_msg = "No camera settings available";
^~~~~~~~~
esp3d/src/core/commands/ESP170.cpp:87:7: note: suggested alternative: 'error_t'
error_msg = "No camera settings available";
^~~~~~~~~
error_t
esp3d/src/core/commands/ESP170.cpp:105:37: error: 'status' was not declared in this scope
String(status.framesize).c_str(), target,
^~~~~~
esp3d/src/core/commands/ESP170.cpp:105:37: note: suggested alternative: 'stat'
String(status.framesize).c_str(), target,
^~~~~~
stat
esp3d/src/core/commands/ESP170.cpp:111:54: error: 'status' was not declared in this scope
if (!dispatchIdValue(json, "quality", String(status.quality).c_str(),
^~~~~~
esp3d/src/core/commands/ESP170.cpp:111:54: note: suggested alternative: 'stat'
if (!dispatchIdValue(json, "quality", String(status.quality).c_str(),
^~~~~~
stat
esp3d/src/core/commands/ESP170.cpp:118:37: error: 'status' was not declared in this scope
String(status.brightness).c_str(), target,
^~~~~~
esp3d/src/core/commands/ESP170.cpp:118:37: note: suggested alternative: 'stat'
String(status.brightness).c_str(), target,
^~~~~~
stat
esp3d/src/core/commands/ESP170.cpp:124:55: error: 'status' was not declared in this scope
if (!dispatchIdValue(json, "contrast", String(status.contrast).c_str(),
^~~~~~
esp3d/src/core/commands/ESP170.cpp:124:55: note: suggested alternative: 'stat'
if (!dispatchIdValue(json, "contrast", String(status.contrast).c_str(),
^~~~~~
stat
esp3d/src/core/commands/ESP170.cpp:131:37: error: 'status' was not declared in this scope
String(status.saturation).c_str(), target,
^~~~~~
esp3d/src/core/commands/ESP170.cpp:131:37: note: suggested alternative: 'stat'
String(status.saturation).c_str(), target,
^~~~~~
stat
esp3d/src/core/commands/ESP170.cpp:275:34: error: conversion from 'const char' to 'String' is ambiguous
String label = camcmd[i];
^
In file included from C:/Users/E2D/.platformio/packages/framework-arduinoespressif32@3.20006.221224/cores/esp32/Arduino.h:166,
from esp3d/src/core/commands/../../include/esp3d_config.h:23,
from esp3d/src/core/commands/ESP170.cpp:20:
C:/Users/E2D/.platformio/packages/framework-arduinoespressif32@3.20006.221224/cores/esp32/WString.h:63:9: note: candidate: 'String::String(const __FlashStringHelper*)'
String(const __FlashStringHelper str);
^~~~~~
C:/Users/E2D/.platformio/packages/framework-arduinoespressif32@3.20006.221224/cores/esp32/WString.h:63:9: note: conversion of argument 1 would be ill-formed:
esp3d/src/core/commands/ESP170.cpp:275:34: error: invalid conversion from 'char' to 'const __FlashStringHelper' [-fpermissive]
String label = camcmd[i];
~~~~~~~~^
In file included from C:/Users/E2D/.platformio/packages/framework-arduinoespressif32@3.20006.221224/cores/esp32/Arduino.h:166,
from esp3d/src/core/commands/../../include/esp3d_config.h:23,
from esp3d/src/core/commands/ESP170.cpp:20:
C:/Users/E2D/.platformio/packages/framework-arduinoespressif32@3.20006.221224/cores/esp32/WString.h:57:9: note: candidate: 'String::String(const char*)'
String(const char cstr = "");
^~~~~~
C:/Users/E2D/.platformio/packages/framework-arduinoespressif32@3.20006.221224/cores/esp32/WString.h:57:9: note: conversion of argument 1 would be ill-formed:
esp3d/src/core/commands/ESP170.cpp:275:34: error: invalid conversion from 'char' to 'const char' [-fpermissive]
String label = camcmd[i];
~~~~~~~~^
esp3d/src/core/commands/ESP170.cpp:279:50: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
int r = esp3d_camera.command(camcmd[i], tmpstr.c_str());
~~~~~~~~^
In file included from esp3d/src/core/commands/ESP170.cpp:23:
esp3d/src/core/commands/../../modules/camera/camera.h:38:30: note: initializing argument 1 of 'int Camera::command(const char*, const char*)'
int command(const char * param, const char * value);
~~~~~~~~~~~~~^~~~~
esp3d/src/core/commands/ESP170.cpp:281:15: error: 'hasError' was not declared in this scope
hasError = true;
^~~~~~~~
esp3d/src/core/commands/ESP170.cpp:281:15: note: suggested alternative: 'strerror'
hasError = true;
^~~~~~~~
strerror
esp3d/src/core/commands/ESP170.cpp:282:15: error: 'error_msg' was not declared in this scope
error_msg = "Unknow command";
^~~~~~~~~
esp3d/src/core/commands/ESP170.cpp:282:15: note: suggested alternative: 'error_t'
error_msg = "Unknow command";
^~~~~~~~~
error_t
esp3d/src/core/commands/ESP170.cpp:285:15: error: 'hasError' was not declared in this scope
hasError = true;
^~~~~~~~
esp3d/src/core/commands/ESP170.cpp:285:15: note: suggested alternative: 'strerror'
hasError = true;
^~~~~~~~
strerror
esp3d/src/core/commands/ESP170.cpp:286:15: error: 'error_msg' was not declared in this scope
error_msg = "Invalid value";
^~~~~~~~~
esp3d/src/core/commands/ESP170.cpp:286:15: note: suggested alternative: 'error_t'
error_msg = "Invalid value";
^~~~~~~~~
error_t
esp3d/src/core/commands/ESP170.cpp:289:15: error: 'ok_msg' was not declared in this scope
ok_msg = "ok";
^~~~~~
esp3d/src/core/commands/ESP170.cpp:289:15: note: suggested alternative: 'msg'
ok_msg = "ok";
^~~~~~
msg
esp3d/src/core/commands/ESP170.cpp:297:46: error: 'hasError' was not declared in this scope
if (!dispatchAnswer(msg, COMMAND_ID, json, hasError,
^~~~~~~~
esp3d/src/core/commands/ESP170.cpp:297:46: note: suggested alternative: 'strerror'
if (!dispatchAnswer(msg, COMMAND_ID, json, hasError,
^~~~~~~~
strerror
esp3d/src/core/commands/ESP170.cpp:298:34: error: 'error_msg' was not declared in this scope
hasError ? error_msg.c_str() : ok_msg.c_str())) {
^~~~~~~~~
esp3d/src/core/commands/ESP170.cpp:298:34: note: suggested alternative: 'error_t'
hasError ? error_msg.c_str() : ok_msg.c_str())) {
^~~~~~~~~
error_t
esp3d/src/core/commands/ESP170.cpp:298:54: error: 'ok_msg' was not declared in this scope
hasError ? error_msg.c_str() : ok_msg.c_str())) {
^~~~~~
esp3d/src/core/commands/ESP170.cpp:298:54: note: suggested alternative: 'msg'
hasError ? error_msg.c_str() : ok_msg.c_str())) {
^~~~~~
msg
*** [.pioenvs\esp32cam\src\src\core\commands\ESP170.cpp.o] Error 1
================================================================================= [FAILED] Took 37.63 seconds =================================================================================
Environment Status Duration
esp32cam FAILED 00:00:37.626
============================================================================ 1 failed, 0 succeeded in 00:00:37.626 ============================================================================
myconfig.h
Screenshots
ESP3D Firmware:
- ESP3D FW version:3.0.0.a226
- ESP3D-WebUI Version:3.0.0-a45.M2.1
- Wifi mode: STA
- Flash method: PlatformIO
Target Firmware:
- Name: Marlin
- Version 2.1.2
Board used (please complete the following information):
- MCU: ESP32
- Name:[e.g. ESP32-CAM
- Flash size: 4M
Additional context
Thank your for submiting, please be sure you followed template or your issue may be dismissed. if you deleted the template it is here
seems there are some typo, orz...
I am out now I will check and fix when back home in few hours
@luc-github has repaired it, thank you.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.