Hi from the text I found on the source code and shared before

Now, I am only giving the snippets .


generic_printf/* 

...
3. Supports almost all the functionalities of GNU std printf routine. (okay it 
does not say which exactly)
...
*/

also this file have there the #define float_support (which according to the 
text above defines the float support)



and then to the PrintfP.nc I have found the following
/**
* This is the PrintfP component.  It provides the printf service for printing
* data over the serial interface using the standard c-style printf command.
* Data printed using printf are buffered
 and only sent over the serial line after
* the buffer is half full or an explicit call to printfflush() is made.  This
* buffer has a maximum size of 250 bytes at present.  This component is wired
* to a shadowed MainC component so that printf statements can be made anywhere
* throughout your code, so long as you include the "printf.h" header file in
* every file you wish to use it.  Take a look at the printf tutorial (lesson 15)
* for more details.
*
* The printf service is currently only available for msp430 based motes
* (i.e. telos, eyes) and atmega128x based motes (i.e. mica2, micaz, iris).  On 
the
* atmega platforms, avr-libc version 1.4 or above must be used.

and as long it is talking about the c-style printf command without mentiong 
what it does not support, I thought that float should be there.


Thanks for the answer :)


Regards
Alex





On Wednesday, November 13, 2013 12:44 PM, Eric Decker <[email protected]> wrote:
 


float is expensive and not implemented.

I don't understand why you think it should already be there.



On Wed, Nov 13, 2013 at 3:41 AM, Alaios <[email protected]> wrote:

Hi all
>
>I am using occasionaly printf to serial port as this is a very nice way to 
>have some debug messages.
>
>
>One way I have noticed is printing floats. IT looks like that only integeres 
>are implemented and I had to write the code myself for floats.
>I also had a look on the source code, so te get better understanding what is 
>supported or not in the tinyos.
>
>
>This is what I found, that looks like that the float support should be there, 
>already.
>
>
>I started by looking inside the
>
>
>
>
>$TOSROOT/lib/printf
>
>
>what I found
>
>
>
>generic_printf/*  has a bit of information:
>
>Written By:
>Shrirang Khishti <[email protected]>.
>
>This is a smaller version of
 printf
>Positive points about this function
>1. Reduces code size considerably ,very useful in embedded applications
>2. No malloc calls are used
>3. Supports almost all the functionalities of GNU std printf routine.
>4. If user dont want float_support in this customized printf
>just undef macro float_support
>*/
>
>
>but my float_support looks defind on the file
>
>
>
>and then to the PrintfP.nc I have found the following
>/**
>* This is the PrintfP component.  It provides the printf service for printing
>* data over the serial interface using the standard c-style printf command.
>* Data printed using printf are buffered
 and only sent over the serial line after
>* the buffer is half full or an explicit call to printfflush() is made.  This
>* buffer has a maximum size of 250 bytes at present.  This component is wired
>* to a shadowed MainC component so that printf statements can be made anywhere
>* throughout your code, so long as you include the "printf.h" header file in
>* every file you wish to use it.  Take a look at the printf tutorial (lesson 
>15)
>* for more details.
>*
>* The printf service is currently only available for msp430 based motes
>* (i.e. telos, eyes) and atmega128x based motes (i.e. mica2, micaz, iris).  On 
>the
>* atmega platforms, avr-libc version 1.4 or above must be used.
>
>which does not say anything for the float, and actually looks like that it 
>should work exactly the same....
>
>
>Any ideas what might be wrong? I will share soon my code
>
>
>Regards
>Alex
>_______________________________________________
>Tinyos-help mailing list
>[email protected]
>https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to