problem with bcd and a number

nephish nephish at gmail.com
Thu Aug 4 14:31:22 EDT 2011


Hey all,

I have been trying to get my head around how to do something, but i am
missing how to pull it off.
I am reading a packet from a radio over a serial port.

i have " two bytes containing the value i need.  The first byte is the
LSB, second is MSB.  Both bytes are BCD-encoded, with the LSB
containing digits zX and MSB containing digits xy.  The system speed
is then xyz%, where 100% means maximum speed and would be given by
bytes 00(LSB) 10(MSB)."

that is a quote from the documentation.
Anyway, i am able to parse out the two bytes i need, but don't know
where to go from there.

thanks for any tips on this.



More information about the Python-list mailing list