Adding scientific notation to chprintf. Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
partyzan
Posts: 1
Joined: Wed Aug 23, 2017 12:19 pm
Been thanked: 1 time

Adding scientific notation to chprintf.  Topic is solved

Postby partyzan » Wed Aug 23, 2017 12:59 pm

Hi, Giovanni!

Why there is no scientific notation in ChibiOS?
Have to print out something like 1.23e-16 sometimes. It is very inconvenient to use float-notation only.
So I did changes in chprintf.c to have %e format, but didn't find any information how to make pull request to chibios repo. There is contrib repo only available for pull-requsting.

Modified chprintf.c file in attachment
Attachments
chprintf.c.zip
(3.21 KiB) Downloaded 173 times

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Adding scientific notation to chprintf.

Postby Giovanni » Wed Aug 23, 2017 2:20 pm

Hi,

Posting in this forum is OK for this. About chprintf(), it is mean as a small system utility not meant to replace a full printf(), you should not expect completeness nor conformance from it.

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: Bing [Bot] and 10 guests