sebflippers
13-03-2012, 18:54
I was going to troubleshoot for a few days like always, but our first regional starts in 2 days. I really need some help. Basically this is what I have gotten to work. The template that it is based on (TemplateOfDoom) is very similar to IterativeRobot. It calls whatever mode we're in, constantly.
package edu.wilsonhs.robotics.seb;
import edu.wpi.first.wpilibj.*;
public class TankDriveOfDoom extends TemplateOfDoom {
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
RobotDrive chassis = new RobotDrive(1,2,3,4);
public void teleOp(){
chassis.tankDrive(leftStick, rightStick);
getWatchdog().feed();
}
public void init(){
getWatchdog().setEnabled(true);
getWatchdog().setExpiration(0.5);
}
}
This drives perfectly, and all of the lights blink properly. Now in order to get other motors and arms working I use the wpilibj's Jaguar class. This line screws everything up:
private final Jaguar pooperScooper = new Jaguar(5);
What happens when i add Just that one single line is that:
1. It enables/disables properly, and my template is set to report that the operator changed modes in netBeans as well(println). It does.
2.All jags will idle (yellow blink), even the ones that moved before.
3. Joysticks won't do anything. Using the trigger to move a motor doesn't work either.
4. No error messages show up anywhere.
And, finally the most important one:
5. The status light, will blink slowly (good) when disabled, but will turn off entirely when activated (Bad). When I comment out that one line, it works just fine (no rhyme intended).
Has anybody ever had this problem before?
thanks, seb
p.s. Yes, I did try pooperScooper.setSafetyEnabled(false);
package edu.wilsonhs.robotics.seb;
import edu.wpi.first.wpilibj.*;
public class TankDriveOfDoom extends TemplateOfDoom {
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
RobotDrive chassis = new RobotDrive(1,2,3,4);
public void teleOp(){
chassis.tankDrive(leftStick, rightStick);
getWatchdog().feed();
}
public void init(){
getWatchdog().setEnabled(true);
getWatchdog().setExpiration(0.5);
}
}
This drives perfectly, and all of the lights blink properly. Now in order to get other motors and arms working I use the wpilibj's Jaguar class. This line screws everything up:
private final Jaguar pooperScooper = new Jaguar(5);
What happens when i add Just that one single line is that:
1. It enables/disables properly, and my template is set to report that the operator changed modes in netBeans as well(println). It does.
2.All jags will idle (yellow blink), even the ones that moved before.
3. Joysticks won't do anything. Using the trigger to move a motor doesn't work either.
4. No error messages show up anywhere.
And, finally the most important one:
5. The status light, will blink slowly (good) when disabled, but will turn off entirely when activated (Bad). When I comment out that one line, it works just fine (no rhyme intended).
Has anybody ever had this problem before?
thanks, seb
p.s. Yes, I did try pooperScooper.setSafetyEnabled(false);