Support of unsigned long long in WString
Closed this issue ยท 7 comments
Hardware:
IDE name: Arduino IDE
Description:
Please add support of unsigned long long in WString
At least:
WString.cpp:
String::String(unsigned long long value, unsigned char base)
{
init();
char buf[1 + 8 * sizeof(unsigned long long)];
ultoa(value, buf, base);
*this = buf;
}
WString.h:
explicit String(unsigned long long, unsigned char base = 10);
Added WString.cpp and WString.h to sonoff directory, got following compile error:
Arduino: 1.8.5 (Windows 10), Board: "ESP32 Dev Module, DOUT, 80MHz, 4MB (32Mb), 115200, None"
WString.cpp:1: error: 'String' does not name a type
String::String(unsigned long long value, unsigned char base)
Anything I can try?
Hi JacekDob, like helmar74, I got a compiler error too.
........\Tasmota\webserver.ino: In function 'void HandleInformation()':
webserver:1934: error: call of overloaded 'String(uint64_t)' is ambiguous
func += F("}1" D_ESP_CHIP_ID "}2"); func += String(ESP.getChipId());
any advice ? ^
To compile tasmota esp32 you need to edit and add in arudino-esp32 files:
In [your_dir]\Arduino\hardware\espressif\esp32\cores\esp32\WString.cpp:
String::String(unsigned long long value, unsigned char base)
{
init();
char buf[1 + 8 * sizeof(unsigned long long)];
ultoa(value, buf, base);
*this = buf;
}
In [your_dir]\Arduino\hardware\espressif\esp32\cores\esp32\WString.h:
explicit String(unsigned long long, unsigned char base = 10);
yeah! That fixed it, thank's a lot!
Next issue ;-)
I compiled it and send it to a ESP32 it's starting, but the ESP didn't connect to Accesspoint.
The conifguration in user_config.h is fine, as I'm using the same for other tasmota projects.
Here's output of serial log:
0:00:00 APP: Baudrate eingestellt auf 115200
00:00:00 Projekt sonoffESP32 Sonoff (Topic sonoff, Fallback DVES_00000000, GroupTopic sonoffs) Version 5.12.0c-STAGED
00:00:00 WIF: verbinden mit AP1 in Modus 11
00:00:15 WIF: Verbindung fehlgeschlagen da der AP nicht antwortet (timeout)
00:00:15 WIF: verbinden mit AP1 in Modus 1
I also changed GroupTopic in user_config.h. it's ignored somehow
Created new Issue: https://github.com/espressif/arduino-esp32/issues/1234
This issue is closed, because it looks as if it is not a bug or problem with the ESP32 Arduino core or its support libraries. For general API usage questions or help on specific coding challenges, please visit the arduino-esp32 Gitter channel. If you feel this issue was closed in error, reopen it and comment, why you think this is a bug in the Arduino-Core.