-
Notifications
You must be signed in to change notification settings - Fork 7
Printing floats in Zephyr #7
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
printf and printk have differences in the implementation and separate buffers. So printk can push stuff without a new line, but printf cannot do that. |
Current solution is to replace all printk calls with printf's, then it works, this can be seen in commit 8bac408. We can consider this as a workaround, as people coming from Zephyr are used to printk, not printf. |
bu adding this line to setup: setvbuf(stdout, NULL, _IONBF, 0); the |
I implemented this in commit a95aab4, this solved the problem like you wrote. |
There is a bug (or maybe feature) in Zephyr with printf implementation: buffer will be sent over serial only after calling printf with newline character or when buffer fills up.
The text was updated successfully, but these errors were encountered: