I havent looked at the Icon Value, but if I had to guess, I'd say you were not using a enough bit values.
The Icon number is a uint16, so Im guessing you need the values from 0182+0183.
It would be something like this
value(0182)+ (value(0183)*256)
You are only yanking only one place with substr, i think you need to nab the next bit too and add it onto the value.
If you notice,
1170 dec is 492 hex
146 dec is 92 hex
624 dec is 270 hex
112 dec is 70 hex
You're losing the leading digit somehow.
|