HSI88 can't read 13 as number

Bug #579676 reported by ron&bram
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rocrail
Fix Released
Medium
ron&bram

Bug Description

The read routine of the HSI88 reads bytes one by one and breaks off and passes the bytes read to the rest of the routine when the byte contains a CR (0x0D). This leads to improper functioning when the HSI wants to report for instance that there are 13 modules connected (message 0x73 0x0d 0x0d) or the state of module 13, because Rocrail breaks off the reading since it considers the reported number as a caariage return. See forum topic http://forum.rocrail.net/viewtopic.php?p=16465#16465 for details and traces.

Revision history for this message
ron&bram (ronaldestherbram) wrote :

A possible solution could be to have the read routine read the expected number of bytes, based upon the content of the first byte and keep on reading, regardless of the byte content, until this number has been read, when the last byte read contains a carriage return the message is valid. This would mean: first byte contains an "s" (0x73), expect 3 bytes; first byte contains an "i", expect (3 + next byte * 3) bytes; first byte contains a "v", expect 41 bytes.

Changed in rocrail:
assignee: nobody → ron&bram (ronaldestherbram)
Revision history for this message
ron&bram (ronaldestherbram) wrote :

Revision 1600

Changed in rocrail:
status: New → Fix Committed
Revision history for this message
ron&bram (ronaldestherbram) wrote :

Raimund reported: test OK.

Changed in rocrail:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.