Skip to content

Commit

Permalink
allow horiz_offset_correction to be optional with 0 as default
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwwood committed Mar 9, 2016
1 parent 47df691 commit ccb9a0b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion velodyne_pointcloud/src/lib/calibration.cc
Expand Up @@ -73,11 +73,17 @@ namespace velodyne_pointcloud
node[DIST_CORRECTION_X] >> correction.second.dist_correction_x;
node[DIST_CORRECTION_Y] >> correction.second.dist_correction_y;
node[VERT_OFFSET_CORRECTION] >> correction.second.vert_offset_correction;
node[HORIZ_OFFSET_CORRECTION] >> correction.second.horiz_offset_correction;
#ifdef HAVE_NEW_YAMLCPP
if (node[HORIZ_OFFSET_CORRECTION])
node[HORIZ_OFFSET_CORRECTION] >>
correction.second.horiz_offset_correction;
#else
if (const YAML::Node *pName = node.FindValue(HORIZ_OFFSET_CORRECTION))
*pName >> correction.second.horiz_offset_correction;
#endif
else
correction.second.horiz_offset_correction = 0;

const YAML::Node * max_intensity_node;
#ifdef HAVE_NEW_YAMLCPP
max_intensity_node = node[MAX_INTENSITY];
Expand Down

0 comments on commit ccb9a0b

Please sign in to comment.