[Gambas-user] Serial port (gb.net) curious error - reading byte value incorrectly.
Anthony Ivan
imperious.ldr at ...2360...
Wed Jan 13 04:00:03 CET 2010
Hello to All,
[Gambas 2.19.0-1 on Fedora 12, Intel X86_64]
I am currently working on a little project that communicates with a VHF
radio via the MAP27 instruction set. All is working perfectly except for
one small error... as detailed below...
When the radio communicates with the PC the serialport_read() triggers
perfectly and takes the byte's of data provided and places them into a
queue for processing ... a typical translated incoming hex string may
look something like:
16 10 02 04 01 00 00 10 03
The next message will increment the 5th byte value by one thus giving:
16 10 02 04 02 00 00 10 03
Oddly enough if the value coming to the serial port from the radio is 1D
(binary value 00011101), Gambas seems to see that value as 1A (binary
value 00011010).
Every other input is working perfectly... and there is absolute
certainty that the incoming byte value is indeed 1D. Also, the outbound
side is ok... if I reply to the radio as if it had sent a 1D with the
appropriate CRC16 checksum everything is happy. Could this be a small
error in the serial code (gb.Net) that someone has encountered or rather
a known issue elsewhere which I have not yet found in my searches?
Thanks,
Anthony
More information about the User
mailing list