-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add printf to print class #28
base: master
Are you sure you want to change the base?
Conversation
Didn't Massimo (@mbanzi) say very clearly, only 2 weeks ago on the developers mail list, that this would not be accepted? |
That may be true, but I'm not in the developer mailing list 😉 |
I'm not going to argue this. My only point is this has been proposed over and over, and the Arduino devs have clearly said it does not belong in Arduino's API. Now that you know this, you can look up what they've said and argue if you like. |
Did some google-fu and found the threads you're referring to. It's really weird, but many (most) of the "We should implement printf in print class" discussions ends up with ranting and personal attacks. Personally I'd love to see this merged because I personally find printf easy to use and understand. However I'd of course respect if the Arduino Gods have a different opinion than me. I'll leave this open until it's merged or closed by any of the developers. |
I believe this is the specific statement from Massimo Banzi that Paul Stoffregen referred to: |
Clearly a lot of people have strong feelings on this matter. Some of those folks may have more passion than wisdom. FWIW, I have some printf code similar to what Bill Perry suggested just today, but it uses Arduino's Print class rather than duplicating so much code and allocating big buffers. When I get a break in working on hardware, I'm planning to turn it into a nice library that works on all boards. |
Paul, could you add a link, please? Just out of interest... |
I believe this is it: |
Bill's code allocates a 128 byte buffer on the stack. Sorry, my own no-buffer printf code isn't public at this time. I already maintain a couple dozen libs, which regularly get requests for platform-specific issues (the ESP folks are the worst - so much breaks on those chips...), so I'm not very inclined to release yet another library in an "alpha" quality state. Edit: Just to be clear, technically any "no buffer" code that relies on Arduino's Print class does involve a 33 byte buffer allocated on the stack, due to Arduino's Print::printNumber() function. |
my StreamLib enables to use printf without support in core API. |
Printf is super useful. This PR will let users use Serial.printf