Go to Post Now, most of the replies are very tactful when they are questioning a teams' design... but some are simply stupid. Keep your heads. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi