![]() |
EasyC: Execute code before autonomous
Hello,
Is there a way to execute code in a loop before the autonomous mode begins? I know that the help says you can not, but our team utilizes a dashboard, and it is very helpful to be able to send back the values of certain sensors to make sure they are working properly. Does anyone have the experience with EasyC to help me out? -Greg |
Re: EasyC: Execute code before autonomous
Maybe a loop in the initilization routine?
|
Re: EasyC: Execute code before autonomous
Yes, just write the function you want to use and put it in intialize. It will execute any code in this function before the match starts. Check this thread out.
http://www.chiefdelphi.com/forums/sh...t=44749&page=2 |
Re: EasyC: Execute code before autonomous
Quote:
|
Re: EasyC: Execute code before autonomous
You only need to call isEnabled to make sure the while loop ends and you don't get stuck in initialize. Initialize is run every time you reset your robot to calibrate any sensors that may need it.
Code:
void Initialize ( void ) |
Re: EasyC: Execute code before autonomous
Quote:
|
Re: EasyC: Execute code before autonomous
Quote:
Code:
while ( !IsEnabled() ) // while the robot is not enabled |
Re: EasyC: Execute code before autonomous
yeah forgot the ! fixed thanks.
|
| All times are GMT -5. The time now is 10:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi