Go to Post You worry about your team. Let other people worry about their own teams. - pfreivald [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
  #1   Spotlight this post!  
Unread 13-03-2012, 18:54
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
New Jaguar Object causing failure

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.

Code:
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:
Code:
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);
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:22.

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