-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
lib_libvsprintf.c: add Add support for %pB parameter. #13536
base: master
Are you sure you want to change the base?
Conversation
[Experimental Bot, please feedback here] No, this PR does not meet the NuttX requirements. Missing Information:
Recommendations:
By addressing these points, your PR will be more informative and likely to be reviewed and merged more quickly. |
i was not aware of %pV and %pS. please don't follow the mistake. |
158e341
to
4801852
Compare
Signed-off-by: likun17 <[email protected]>
4801852
to
db50b89
Compare
Linux kernel uses the similar approach to extend the format specifier:
Could you give more info why it isn't good? |
printk is a non-standard linux-internal api, which isn't meant to conform any standards.
printf("%pS", NULL) should yield something like "0x0S". besides that, these kinds of extensions are not recognized by the compiler's |
Ok, @Otpvondoiats let's add an option in Kconfig to control this special format specifier. |
Get |
@yamt please review the new implementation which disable the extension by default. |
…at specifier. Signed-off-by: likun17 <[email protected]>
ac9d5ec
to
c463c58
Compare
i feel it's difficult to use a kconfig which alters the behavior of very basic things like printf. isn't it simper to provide an alternative api, say, nuttx_printf, to provide the extension? (similarly to linux printk) |
Summary
Impact
None. This is a new parameter parsing and does not affect existing parameters.
Testing
order:
uorb_listener -n 10 sensor_accel_uncal
out:
timestamp:57777591900,x:0.081402,y:0.689530,z:9.897630,temperature:31.253906
is B parameter output results