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

error printf for uint64_t,... #5430

Closed
TienHuyIoT opened this issue Dec 4, 2018 · 4 comments
Closed

error printf for uint64_t,... #5430

TienHuyIoT opened this issue Dec 4, 2018 · 4 comments

Comments

@TienHuyIoT
Copy link

Sample Code:
uint64_t i = 12345678901234;
Serial.begin(115200);
Serial.printf("\r\nTest: %llu", i);

Get:
"Test: lu"

But, i try test with ESP32. I get "Test: 12345678901234". How to solve for esp8266

@Jeroen88
Copy link
Contributor

Jeroen88 commented Dec 4, 2018

You could try %lu or even %u?

@TienHuyIoT
Copy link
Author

When I try %lu or %u. I got a result as uint32_t.

@Jeroen88
Copy link
Contributor

Jeroen88 commented Dec 4, 2018

Then I can't help you, sorry!

@d-a-v
Copy link
Collaborator

d-a-v commented Dec 4, 2018

%Lu is synonym for %llu and this one neither works (shows 32 bits like %u / %lu).
Is there really a need to show such large numbers ?

earlephilhower added a commit to earlephilhower/Arduino that referenced this issue Dec 4, 2018
Adds support for %lld, %llx, etc. 64-bit integer printing, useful
for logging timestamps and other things.

Fixes esp8266#5430
devyte pushed a commit that referenced this issue Dec 4, 2018
* Fix the template.json with latest core patches

* Add 64-bit %ll printf format support

Adds support for %lld, %llx, etc. 64-bit integer printing, useful
for logging timestamps and other things.

Fixes #5430

* Remove unwanted updated JSON
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

3 participants