![]() |
Will this autonomous code work?
Our build team has been working on the robot for quite a while and we haven't had time to check to see if our code will work. I don't think it's likely that we will have time soon, so I wanted to see if any of you on Chief Delphi would be able to spot any problems with it right off the bat.
This code is supposed to make the robot drive 100 inches and then stop, slowing down after every sixth of the target distance it has traveled. Code:
void OperatorControl(void)Code:
else if (stick1.GetRawButton(6) == true) |
Re: Will this autonomous code work?
Well, first and foremost, all of this needs to be in void Autonomous(void), not void OperatorControl(void). If you upload this code and enable Autonomous, nothing will happen; the code above would run if you enabled Teleoperated and held down button #6 on your joystick.
Other than that, your logic seems sound. |
Re: Will this autonomous code work?
Keep in mind that the floor may be slightly elevated in some locations do to the general geography so it may take a little tweaking once you actually get there.
I know that we had to use two different autonomous modes for each side of the field in Palmetto because of this. One side was slightly more elevated than the other. |
| All times are GMT -5. The time now is 17:47. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi