Skip to content

Commit c1a057f

Browse files
author
Aaron Roller
committed
config start time only happens if configuring started AM-695/error-on-init
1 parent 9b24d0e commit c1a057f

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

rostest/error_tolerant_before_config/error_tolerant_before_config_rostest.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ class LifeCycleErrorTest : public RostestBase, public am::AMLifeCycle
1111
{
1212
errorTolerant("tolerant error during construction", "HW8S");
1313
}
14-
15-
16-
void onConfigure()
17-
{
18-
//do nothing...stay in configure
19-
}
2014
};
2115

2216
TEST_F(LifeCycleErrorTest, testStatus_Error)

src/super_lib/am_life_cycle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ bool AMLifeCycle::withinConfigureTolerance()
263263
{
264264
bool tolerated = false;
265265
//outside of configuring, we have no tolerance
266-
if(life_cycle_info_.state == LifeCycleState::CONFIGURING)
266+
if(life_cycle_mediator_.unconfigured(life_cycle_info_))
267267
{
268268
ros::Duration duration_since_configure = ros::Time::now() - configure_start_time_;
269-
if (duration_since_configure <= ros::Duration(configure_tolerance_s) )
269+
if (life_cycle_info_.state == LifeCycleState::UNCONFIGURED || duration_since_configure <= ros::Duration(configure_tolerance_s) )
270270
{
271271
tolerated = true;
272272
}

0 commit comments

Comments
 (0)