Skip to content

Commit

Permalink
Return corrected parameter value to dynamic_reconfigure
Browse files Browse the repository at this point in the history
  • Loading branch information
bgromov committed Aug 28, 2013
1 parent 491e0e1 commit 14b6108
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/nodes/trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,9 @@ bool Trigger::reconfigure(Config *newconfig)
{
if (!Trigger::setMode(camera_, triggerMode_))
{
// Possible if driver compiled against different version of libdc1394
ROS_ASSERT(triggerMode_ <= DC1394_TRIGGER_MODE_MAX);
newconfig->trigger_mode = Trigger::trigger_mode_names_[triggerMode_ - DC1394_TRIGGER_MODE_MIN];
ROS_ERROR("Failed to set trigger mode");
is_ok = false;
}
Expand All @@ -455,6 +458,9 @@ bool Trigger::reconfigure(Config *newconfig)
{
if (!Trigger::setSource(camera_, triggerSource_))
{
// Possible if driver compiled against different version of libdc1394
ROS_ASSERT(triggerSource_ <= DC1394_TRIGGER_SOURCE_MAX);
newconfig->trigger_source = Trigger::trigger_source_names_[triggerSource_ - DC1394_TRIGGER_SOURCE_MIN];
ROS_ERROR("Failed to set trigger source");
is_ok = false;
}
Expand All @@ -474,6 +480,9 @@ bool Trigger::reconfigure(Config *newconfig)
{
if (!Trigger::setPolarity(camera_, triggerPolarity_))
{
// Possible if driver compiled against different version of libdc1394
ROS_ASSERT(triggerPolarity_ <= DC1394_TRIGGER_ACTIVE_MAX);
newconfig->trigger_polarity = Trigger::trigger_polarity_names_[triggerPolarity_ - DC1394_TRIGGER_ACTIVE_MIN];
ROS_ERROR("Failed to set trigger polarity");
is_ok = false;
}
Expand Down

0 comments on commit 14b6108

Please sign in to comment.