mirror of
https://github.com/LX3JL/xlxd.git
synced 2025-12-06 07:42:01 +01:00
cleanly print out ambe model and version
instead of raw printing whole ambe control packet reply, including non-printable chars, field identifiers and even parity byte...
This commit is contained in:
parent
60f167b339
commit
3801ffdec5
|
|
@ -355,7 +355,12 @@ bool CUsb3xxxInterface::ReadDeviceVersion(void)
|
|||
ok = (len != 0);
|
||||
//we succeed in reading a packet, print it out
|
||||
std::cout << "ReadDeviceVersion : ";
|
||||
for ( i = 4; i < len+4 ; i++ )
|
||||
for ( i = 5; (i < len+4) && (rxpacket[i] != 0x00); i++ )
|
||||
{
|
||||
std::cout << (char)(rxpacket[i] & 0x00ff);
|
||||
}
|
||||
std::cout << " ";
|
||||
for ( i = i+2; (i < len+4) && (rxpacket[i] != 0x00); i++ )
|
||||
{
|
||||
std::cout << (char)(rxpacket[i] & 0x00ff);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue