On Apr 25, 11:45 am, Joep Suijs <[email protected]> wrote:
> Hi all,
>
> The code looks good and a valueble addition.
> What I don't like that this implementation changes the api by adding
> two parameters. First of all, this breaks exisiting code. And second,
> I like the simple interface:
> print_word_dec(serial_hw_data, OutVoltage)
This means leave print.jal as it is and modify format.jal.
If this is the case I would like to copy all of print.jal to
format.jal and
Rename al with prefix format in stead of print and restore print.jal
as it was.
then finally I think format.jal will be used more for lcd and
print.jal more for serial.
If you use the original print_byte_dec( lcd, value ) and the one I
changed
print_byte_dec( lcd, value, 3, 0) on a loop counting down from 254 to
0
on a lcd, you will notice the difference between them.
IMHO the modified one (print_byte_dec(lcd,value, 3, 0)) is more useful
on lcd
and the original one (print_byte_dec(serial_hw_data,value)) is more
useful
with serial communication.
> Thne new implementation requires two extra params, I think for the
> number of chars to be output and the fixed point position. This is
> valueble in some applications, like puting numbers on an lcd without
> messing up the layout. But in many apps you don't need this and I
> don't want to be bothered whit those extra params.
OK but for lcd it can be very useful
> What I suggest is to create an additional api, maybe:
> format_word_dec(serial_hw_data, OutVoltage, 4, 1)
>
> (although this might break the old format.jal interface...)
I think we need to at least change one format.jal or print.jal to add
n_tot and decp
>
> The new and old function can share the core functions (if this does
> not give too much overhead in flash or ram)
>
> Please share your view on the subject!
>
> Joep
>
I wait to see what you all decide and continue from there on.
Greetz
Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---