FloatString v1.1 update
camt
Posts: 45
An update to FloatString has been sent to the object exchange and is included below. It adds the FloatToFormat routine which returns a string of up to 9 characters with a specified number of decimal points. Useful for formated displays. See the Sensirion demo for an example of use.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cam Thompson
Micromega Corporation
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cam Thompson
Micromega Corporation
Comments
Using Float32 from your main program and from Float32 needs patching Float32 (put the VAR cells into DAT) and you have to know what you are doing!) It is nonsense to start another Float32-COG just for the needs of FloatString.
This seems still to be an issue.
It's not Cam's fault; it's a design flaw with SPIN.
P.S.: Efficient multi COG Math32 is in fact very tricky as it needs so much overhead within a SPIN programm that the speed-up is mainly lost; there seems to be little interest in Floating Point Math here in the forum. Should it be otherwise, I am interested in disussing improvements there (e.g. chain computations avoiding the intermediate packing and unpacking, complex operations or matrix multiplication,... ) See also Micromega's FPU which for twice the price is not faster than a COG but has much more program space in its ROM....