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

Commit

Permalink
add CRC/checksum verification
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-nguyen committed Feb 28, 2016
1 parent 5b72d10 commit 12867dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/imu_vn_100.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ void asciiOrBinaryAsyncMessageReceived(void* userData, vn::protocol::uart::Packe
// Not the type of binary packet we are expecting.
return;

if (!p.isValid()) {
ROS_WARN("Vn: Invalid packet received. CRC or checksum failed.");
return;
}

imu->PublishData(p);
}

Expand Down

0 comments on commit 12867dc

Please sign in to comment.