![]() |
Autonomous Timer
Hi! I'm working on some autonomous code for my robot. The code is to drive forward. In the code, it should be under the function driveForward(). Anyways, what I would like to do is to be able to make it drive forward at a certain speed for a certain amount of time. I have the speed down, and it's driving. I just need to know how to do the timed stuff. Sorry if it's a pretty basic question. I just started programming autonomous and I have never done this before.
Here is the code that includes driveForward(): Code:
package org.usfirst.frc.team4501.robot.subsystems;Code:
package org.usfirst.frc.team4501.robot; |
Re: Autonomous Timer
My bad! The function is actually called forwardMove()!
|
Re: Autonomous Timer
You're missing a few steps to do this the way the framework intends.
Pull the following out of autonomousPeriodic: Code:
driveTrain.forwardMove(0.05, 0.05);Next change: Code:
Command autonomousCommand;Code:
Command autonomousCommand = new DriveForwardForXAtYCommand(0.80, 6000);Code:
/** |
| All times are GMT -5. The time now is 09:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi