radioshack-dmm: Be more verbose with packet checks
Add sr_spew() messages to state why the packet was found to be invalid. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
parent
2ecc5d432f
commit
9047358761
|
@ -183,11 +183,15 @@ SR_PRIV gboolean rs_22_812_packet_valid(const struct rs_22_812_packet *rs_packet
|
||||||
if (!(rs_packet->mode < MODE_INVALID))
|
if (!(rs_packet->mode < MODE_INVALID))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!checksum_valid(rs_packet))
|
if (!checksum_valid(rs_packet)) {
|
||||||
|
sr_spew("Packet with invalid checksum. Discarding.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!selection_good(rs_packet))
|
if (!selection_good(rs_packet)) {
|
||||||
|
sr_spew("Packet with invalid selection bits. Discarding.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue