LVMakerHub / LINX

LabVIEW Community Edition LINX
Other
108 stars 114 forks source link

Digital Read Returns Extra Bytes When More Than 1 Bytes Is Necessary For Return Data #44

Closed samkristoff closed 9 years ago

samkristoff commented 9 years ago

Digital read works, but there are exrta bytes in the packet that get ignored. This works because the G that parses out the pin values does so based on the number of pins sent, not the number of bits in the response packet.

I think the issue is probably in the Listener code where we try to figure out how many bytes we need to return.

samkristoff commented 9 years ago

Fixed in 2.0.0.85

Return packet now uses correct number of bytes required as follows: unsigned char numRespBytes = ((commandPacketBuffer[1]-7)-1 >> 3) +1;

rather bit packing but still return a number of bytes equal to the number of DI channels specified.