Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of unsigned long long in WString #1066

Closed
JacekDob opened this issue Feb 2, 2018 · 7 comments
Closed

Support of unsigned long long in WString #1066

JacekDob opened this issue Feb 2, 2018 · 7 comments

Comments

@JacekDob
Copy link

JacekDob commented Feb 2, 2018

Hardware:

IDE name: Arduino IDE

Description:

Please add support of unsigned long long in WString

@JacekDob
Copy link
Author

JacekDob commented Feb 6, 2018

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);

@helmar74
Copy link

helmar74 commented Mar 16, 2018

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?

@juanimoni
Copy link

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 ? ^

@JacekDob
Copy link
Author

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);

@helmar74
Copy link

yeah! That fixed it, thank's a lot!

@helmar74
Copy link

helmar74 commented Mar 18, 2018

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

@everslick
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants