MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / tick

Method tick

tests/navigation_test.cpp:130–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 {}
129
130 NodeStatus tick() override
131 {
132 if(status() == NodeStatus::IDLE)
133 {
134 setStatus(NodeStatus::RUNNING);
135 _halted = false;
136 std::cout << "FollowPath::started" << std::endl;
137 _initial_time = Now();
138 }
139
140 // Yield for 1 second
141 while(Now() < _initial_time + Milliseconds(600) || _halted)
142 {
143 return NodeStatus::RUNNING;
144 }
145 if(_halted)
146 {
147 return NodeStatus::IDLE;
148 }
149 return tickImpl();
150 }
151 void halt() override
152 {
153 std::cout << "FollowPath::halt" << std::endl;

Callers

nothing calls this directly

Calls 1

NowFunction · 0.85

Tested by

no test coverage detected