diff --git a/src/CYdLidar.cpp b/src/CYdLidar.cpp index 390cf27..124aed6 100644 --- a/src/CYdLidar.cpp +++ b/src/CYdLidar.cpp @@ -136,7 +136,7 @@ bool CYdLidar::doProcessSimple(LaserScan &outscan,LaserScan &syncscan, PointClo for( ; i < count; i++) { if ((nodes[i].distance_q) != 0) { float angle = (float)((nodes[i].angle_q6_checkbit >> LIDAR_RESP_MEASUREMENT_ANGLE_SHIFT)/64.0f); - if(reversion&&m_Reversion){ + if(reversion&&!m_Reversion){ angle=angle+180; if(angle>=360){ angle=angle-360;} nodes[i].angle_q6_checkbit = ((uint16_t)(angle * 64.0f)) << LIDAR_RESP_MEASUREMENT_ANGLE_SHIFT;