![]() |
Logical Auto?
Anyone know if you can safely do logic in Autonomous mode?
Something like Code:
while(condition) { |
Re: Logical Auto?
Careful with the while command. Better to use autonomusperodic
|
Re: Logical Auto?
Quote:
|
Re: Logical Auto?
There is a concept of a "heartbeat". I believe it goes something like this: if your code does not return from periodic after a certain amount of time, the system presumes your code has crashed and disables all motors.
While loop can take too long to execute and trigger the fail safe. |
Re: Logical Auto?
Quote:
|
Re: Logical Auto?
Quote:
|
Re: Logical Auto?
We don't use command based, but all while loops in any of our three main functions (Teleop, Autonomous, or Test) look like this:
Code:
while(IsOperatorControl() && IsEnabled()) {}Code:
while(IsAutonomous() && IsEnabled()) {}Hope that helps. |
| All times are GMT -5. The time now is 10:16 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi