Graphics.spin annoyance
I'm using Chip Gracey's Graphics Driver v1.0 and when printing to a LCD screen.
When a previously larger decimal value is displayed, and then later a shorter value is posted, the right most digits are not cleared. Thus a value, say, of 'value=1234' is displayed and then the value becomes smaller and smaller, say '9', the 'value=9xxx' is displayed, where the 'xxx' is the last previously posted numbers shown. Very confusing trying to decipher actual value.
Is there a way to overwrite with spaces or something to remove previous larger number of digits? I wish there were something for decimal similar to hex, where you specify how many digits to display.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
When a previously larger decimal value is displayed, and then later a shorter value is posted, the right most digits are not cleared. Thus a value, say, of 'value=1234' is displayed and then the value becomes smaller and smaller, say '9', the 'value=9xxx' is displayed, where the 'xxx' is the last previously posted numbers shown. Very confusing trying to decipher actual value.
Is there a way to overwrite with spaces or something to remove previous larger number of digits? I wish there were something for decimal similar to hex, where you specify how many digits to display.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko

Comments
-Phil
Addendum: Or you could adapt my decn routine, which right-justifies the number in a fixed-width field:
[b]PUB[/b] decn(value, digits) | mindigits, val '' Print a decimal number, right-justified in a field width given by digits. mindigits := ((value < 0) & 1) + 1 [b]if[/b] (value <> $8000_0000) val := || value [b]repeat[/b] [b]while[/b] (val /= 10) mindigits++ [b]if[/b] (value < 0 [b]and[/b] digits < 0) out("-") value := ||value [b]repeat[/b] (||digits - mindigits) #> 0 [b]if[/b] (digits < 0) out("0") [b]else[/b] out(" ") dec(value)-P.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Apps:· http://www.rayslogic.com/propeller/Programming/Programming.htm
My Prop Info: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
Phil, looks like I could temporarily add your routine. The program is so bloated now I can't add SD card use, not without compressing some 700+ longs!!
But it can help me NOW during the debug phase on getting everything working up to the point I could possibly make use of a SD card.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko