fix 'sc raw' - now raw command automatically adjust when getting a 0x6C response code and resend command.

This commit is contained in:
Chris 2018-11-08 13:45:57 +01:00
parent 3731ca19d2
commit affee79b69

View file

@ -224,6 +224,21 @@ int CmdSmartRaw(const char *Cmd) {
free(buf);
return 2;
}
if ( buf[0] == 0x6C ) {
data[4] = buf[1];
memcpy(c.d.asBytes, data, sizeof(data) );
clearCommandBuffer();
SendCommand(&c);
len = smart_response(buf);
// TLV decoder
if (len > 4)
TLVPrintFromBuffer(buf+1, len-3);
data[4] = 0;
}
if (decodeTLV && len > 4)
TLVPrintFromBuffer(buf+1, len-3);