-
Notifications
You must be signed in to change notification settings - Fork 13.3k
printf with FlashHelperString #4224
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
Comments
can you bring complete print.h and print.cpp file with a small example here please? Here how i can use printf but i can not use it with FlashHelperString. i added this code in my sketch,
For example, esp8266 EEPROM dump to serial monitor:
Here is output on Serial Monitor:
Thank you, |
seems like we should wait for #4223 and dependants to resolve. |
Closing as #4223 and future releases support %s and %S in flash or RAM. |
Hello,
I upgraded to 2.4.0 and I had again to restore my hack to be able to printf with FlashStringHelper string.
I saw the new printf_P feature, but this doesn't solve my issue, because I want to use both F() Strings and normal in debug, without thinking about it.
The new implementation breaks my debug system.
Anyhow: this is the complete hack, which is very simple:
in Print.h
I put this near the end, just before
In Print.cpp:
I usually add this after the original printf(const char *format, ...) function and it adds the requested feature.
I know this is probably more of a pull request than an issue, but I don't know how to make one, so I figured someone will do that if they find this interesting and useful.
The text was updated successfully, but these errors were encountered: