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:
Alexandru Gagniuc 2012-11-21 19:33:55 -06:00
parent 2ecc5d432f
commit 9047358761
1 changed files with 6 additions and 2 deletions

View File

@ -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))
return FALSE;
if (!checksum_valid(rs_packet))
if (!checksum_valid(rs_packet)) {
sr_spew("Packet with invalid checksum. Discarding.");
return FALSE;
}
if (!selection_good(rs_packet))
if (!selection_good(rs_packet)) {
sr_spew("Packet with invalid selection bits. Discarding.");
return FALSE;
}
return TRUE;
}