Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit 12867dc

Browse files
committed
add CRC/checksum verification
1 parent 5b72d10 commit 12867dc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/imu_vn_100.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@ void asciiOrBinaryAsyncMessageReceived(void* userData, vn::protocol::uart::Packe
408408
// Not the type of binary packet we are expecting.
409409
return;
410410

411+
if (!p.isValid()) {
412+
ROS_WARN("Vn: Invalid packet received. CRC or checksum failed.");
413+
return;
414+
}
415+
411416
imu->PublishData(p);
412417
}
413418

0 commit comments

Comments
 (0)