View Single Post
  #2   Spotlight this post!  
Unread 25-01-2013, 16:08
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Do I need to jaguar.set() every iteration for my motors to stay on?

Quote:
Originally Posted by ZombieHippie View Post
Is it necessary to set(); a Jaguar's speed every time upon execute() in my command?
Example:
can I change this:
Code:
        protected void initialize() {

		setTimeout(timeout);

		hasFinished = false;

		arm.setSpeed(this.speed);

	}
	protected void execute() {

		arm.setSpeed(this.speed);

		if (arm.getSensorRetracted())

			hasFinished = true;

	}
TO this:


Code:
       protected void initialize() {

		setTimeout(timeout);

		hasFinished = false;

		arm.setSpeed(this.speed);

	}


	protected void execute() {

                //The difference

		if (arm.getSensorRetracted())

			hasFinished = true;

	}
Thanks!
as long as arm is a required subsystem.

also, if your using java, dont set hasFinished but rather just do

protected void isFinished(){
return arm.getSensorRetracted();
}
Reply With Quote