I’am experimenting with Blynk.Air therefore i use the BlynkEdgent sample sketch. It is working fine but i get two compiler warnings.
In file included from /home/pi/Documents/ESP32/Test/BlynkEdgent.h:25,
from /home/pi/Documents/ESP32/Test/Test.ino:14:
/home/pi/Documents/ESP32/Test/Console.h: In lambda function:
/home/pi/Documents/ESP32/Test/Console.h:30:5: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
);
^
/home/pi/Documents/ESP32/Test/Console.h: In lambda function:
/home/pi/Documents/ESP32/Test/Console.h:45:5: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
);
^
This is the 1st warning in Console.h
edgentConsole.addCommand(“devinfo”, {
edgentConsole.printf(
R"json({“board”:“%s”,“tmpl_id”:“%s”,“fw_type”:“%s”,“fw_ver”:“%s”})json" “\n”,
BLYNK_DEVICE_NAME,
BLYNK_TEMPLATE_ID,
BLYNK_FIRMWARE_TYPE,
BLYNK_FIRMWARE_VERSION
);
and this the 2nd in Console.h
edgentConsole.printf( R"json({"ssid":"%s","bssid":"%02x:%02x:%02x:%02x:%02x:%02x","rssi":%d})json" "\n", ssidBuff, mac[5], mac[4], mac[3], mac[2], mac[1], mac[0], WiFi.RSSI() );
How can i fix it?
Hans.