Closed bpieres closed 3 years ago
Hi, I have this compiling error. Any Idea? Thanks!
Processing Gateway_38 (platform: espressif32; board: heltec_wifi_lora_32; framework: arduino) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/heltec_wifi_lora_32.html PLATFORM: Espressif 32 (3.1.1) > Heltec WiFi LoRa 32 HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (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:
-v, --verbose
^ C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/ESP-sc-gway.ino:84:0: note: this is the location of the previous definition
^ LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 39 compatible libraries Scanning dependencies... Dependency Graph |-- |-- 1.0 |-- 6.14.0 |-- 1.0 | |-- 1.0 | |-- 1.0 | |-- 1.0 | | |-- 1.0 |-- 1.1.0 | |-- 1.0 |-- 1.0 | |-- 1.0 |-- 1.0 |-- 1.0.0 |-- 1.0 |-- 1.0 | |-- 1.0 |-- 5.0.0 |-- 1.6 |-- 1.0.2 |-- 1.0 | |-- 1.0 | |-- 1.0 |-- 1.0 |-- 1.0.0 | |-- 1.1.0 | | |-- 1.0 | |-- 1.0 | | |-- 1.0 | |-- 1.0 | | |-- 1.0 | | |-- 1.0 | |-- 1.0 |-- 3.2.7 | |-- 1.0.1 | |-- 1.0 Building in release mode Warning! Unknown upload protocol esptoolboard_build.flash_mode Compiling .pio\build\Gateway_38\src\ESP-sc-gway.ino.cpp.o Compiling .pio\build\Gateway_38\libe7e\WiFi\WiFiMulti.cpp.o Compiling .pio\build\Gateway_38\libe7e\WiFi\WiFiSTA.cpp.o Compiling .pio\build\Gateway_38\libe7e\WiFi\WiFiScan.cpp.o C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino: In function 'int sendPacket(uint8_t, uint8_t)': C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:118:15: warning: unused variable 'time' [-Wunused-variable] const char time = root["txpk"]["time"]; // Time is a string in UTC ^ C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino: In function 'int buildPacket(uint8_t, LoraUp, bool)': C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:545:66: error: no matching function for call to 'serializeJson(ArduinoJson6140_0000010::StaticJsonDocument<400u>&, const char, int)' int written = serializeJson(doc, (const char )p, buff_index+20 ); // size is buff_index + encoded data + some closing chars ^ In file included from lib/ArduinoJson/src/ArduinoJson.hpp:34:0, from lib/ArduinoJson/src/ArduinoJson.h:9, from C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/ESP-sc-gway.ino:57: lib/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:106:8: note: candidate: template size_t ArduinoJson6140_0000010::serializeJson(const TSource&, void, size_t) size_t serializeJson(const TSource &source, void buffer, size_t bufferSize) { ^ lib/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:106:8: note: template argument deduction/substitution failed: C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:545:66: note: cannot convert 'p' (type 'const char') to type 'void' int written = serializeJson(doc, (const char )p, buff_index+20 ); // size is buff_index + encoded data + some closing chars ^ In file included from lib/ArduinoJson/src/ArduinoJson.hpp:34:0, from lib/ArduinoJson/src/ArduinoJson.h:9, from C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/ESP-sc-gway.ino:57: lib/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:101:8: note: candidate: template<class TSource, class TDestination> size_t ArduinoJson6140_0000010::serializeJson(const TSource&, TDestination&) size_t serializeJson(const TSource &source, TDestination &destination) { ^ lib/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:101:8: note: template argument deduction/substitution failed: C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:545:66: note: candidate expects 2 arguments, 3 provided int written = serializeJson(doc, (const char )p, buff_index+20 ); // size is buff_index + encoded data + some closing chars ^ C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:286:7: warning: unused variable 'cfreq' [-Wunused-variable] char cfreq[12] = {0}; // Character array to hold freq in MHz ^ C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:539:6: warning: unused variable 'len' [-Wunused-variable] int len= base64_encode(doc["data"], (char )message, messageLength); ^ C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:545:6: warning: unused variable 'written' [-Wunused-variable] int written = serializeJson(doc, (const char )p, buff_index+20 ); // size is buff_index + encoded data + some closing chars ^ In file included from lib/ArduinoJson/src/ArduinoJson/Operators/VariantOperators.hpp:7:0, from lib/ArduinoJson/src/ArduinoJson/Variant/VariantRef.hpp:12, from lib/ArduinoJson/src/ArduinoJson/Array/ArrayIterator.hpp:8, from lib/ArduinoJson/src/ArduinoJson/Array/ArrayRef.hpp:8, from lib/ArduinoJson/src/ArduinoJson.hpp:17, from lib/ArduinoJson/src/ArduinoJson.h:9, from C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/ESP-sc-gway.ino:57: lib/ArduinoJson/src/ArduinoJson/Operators/VariantCasts.hpp: In instantiation of 'ArduinoJson6140_0000010::VariantCasts::operator T() const [with T = char; TImpl = ArduinoJson6140_0000010::MemberProxy<ArduinoJson6140_0000010::JsonDocument&, const char>]': C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/_txRx.ino:539:68: required from here lib/ArduinoJson/src/ArduinoJson/Operators/VariantCasts.hpp:16:35: error: invalid conversion from 'ArduinoJson6140_0000010::VariantAs<char>::type {aka const char}' to 'char*' [-fpermissive] return impl()->template as(); ^ *** [.pio\build\Gateway_38\src\ESP-sc-gway.ino.cpp.o] Error 1
Solved..
Hi, I have this compiling error. Any Idea? Thanks!
Processing Gateway_38 (platform: espressif32; board: heltec_wifi_lora_32; framework: arduino) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via
-v, --verbose
option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/heltec_wifi_lora_32.html PLATFORM: Espressif 32 (3.1.1) > Heltec WiFi LoRa 32 HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (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:define ESP_getChipId() (ESP.getChipId())
^ C:/Users/gosu/Documents/Arduino/LORA/gw/ESP-1ch-Gateway/src/ESP-sc-gway.ino:84:0: note: this is the location of the previous definition
define ESP_getChipId() ((uint32_t)ESP.getEfuseMac())
^ LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 39 compatible libraries Scanning dependencies... Dependency Graph |--
|-- 1.0
|-- 6.14.0
|-- 1.0
| |-- 1.0
| |-- 1.0
| |-- 1.0
| | |-- 1.0
|-- 1.1.0
| |-- 1.0
|-- 1.0
| |-- 1.0
|-- 1.0
|-- 1.0.0
|-- 1.0
|-- 1.0
| |-- 1.0
|-- 5.0.0
|--