%d% works only with 2 digit decimal numbers

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
tom-tom
Member
Posts: 35
Joined: Mon Sep 10, 2007 5:37 pm
Location: Hungary

%d% works only with 2 digit decimal numbers

Post by tom-tom »

If I try to send out a decimal value using %d% in Generic Serial Module's Command Write Data it seems that only the last two digits of the decimal number is sent out correctly. The first digit will create another byte. Does this mean that I can't use it for sending out any numbers over 99. Any experiences about this?
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Did you also try %1%. It is no answer, but it may be a work around.
tom-tom
Member
Posts: 35
Joined: Mon Sep 10, 2007 5:37 pm
Location: Hungary

Post by tom-tom »

AFAIK %1% sends out ASCII bytes. I use it somewhere else and it works OK. I got around this issue using %x% substituting hexa values. I just wanted to know whether it is a bug with the decimal values. Sometimes it can be useful to be able to send out decimal values without converting them to hex. Anyway the conversion doesn't take much either using a script. I might have sent my previous post in the bug section of the forum.
Post Reply