Skip to content

Commit

Permalink
fix: change difop data byte to both consider 0x00 and 0x ff
Browse files Browse the repository at this point in the history
  • Loading branch information
baoxianzhang authored and Tony-HIT committed Aug 14, 2018
1 parent 5bb937b commit ab09542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rslidar_pointcloud/src/rawdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ void RawData::processDifop(const rslidar_msgs::rslidarPacket::ConstPtr& difop_ms
{
bool curve_flag = true;
// check difop reigon has beed flashed the right data
if ((data[50] == 0x00 && data[51] == 0x00 && data[52] == 0x00 && data[53] == 0x00) ||
(data[50] == 0xff && data[51] == 0xff && data[52] == 0xff && data[53] == 0xff))
if ((data[50] == 0x00 || data[50] == 0xff) && (data[51] == 0x00 || data[51] == 0xff) &&
(data[52] == 0x00 || data[52] == 0xff) && (data[53] == 0x00 || data[53] == 0xff))
{
curve_flag = false;
}
Expand Down Expand Up @@ -312,8 +312,8 @@ void RawData::processDifop(const rslidar_msgs::rslidarPacket::ConstPtr& difop_ms
{
bool angle_flag = true;
// check difop reigon has beed flashed the right data
if ((data[1165] == 0x00 && data[1166] == 0x00 && data[1167] == 0x00 && data[1168] == 0x00) ||
(data[1165] == 0xff && data[1166] == 0xff && data[1167] == 0xff && data[1168] == 0xff))
if ((data[1165] == 0x00 || data[1165] == 0xff) && (data[1166] == 0x00 || data[1166] == 0xff) &&
(data[1167] == 0x00 || data[1167] == 0xff) && (data[1168] == 0x00 || data[1168] == 0xff))
{
angle_flag = false;
}
Expand Down

0 comments on commit ab09542

Please sign in to comment.