View Single Post
  #1   Spotlight this post!  
Unread 20-02-2012, 17:15
Jun8 Jun8 is offline
Registered User
FRC #1850
 
Join Date: Dec 2011
Location: Chicago
Posts: 4
Jun8 is an unknown quantity at this point
Problem with Jaguar control on drivetrain

Hello,

I created a Drive subsystem using the Subsystem/Command approach described in the WPILib Cookbook.

Here's Drive.h

Code:
class Drive: public Subsystem {
private:
	RobotDrive *drive;
	Jaguar *leftFront;
	Jaguar *leftBack;
	Jaguar *rightFront;
	Jaguar *rightBack;
public:
	Drive();
	void driveWithJoystick(Joystick *stick);
	void InitDefaultCommand();
};
and here's Drive.cpp

Code:
#include "Drive.h"
#include "../Robotmap.h"

Drive::Drive() : Subsystem("Drive") {
	leftFront = new Jaguar(LEFT_FRONT_MOTOR);
	leftBack = new Jaguar(LEFT_BACK_MOTOR);
	rightFront = new Jaguar(RIGHT_FRONT_MOTOR);
	rightBack = new Jaguar(RIGHT_BACK_MOTOR);
	
	drive = new RobotDrive(leftFront, leftBack, rightFront, rightBack);
	drive->SetSafetyEnabled(false);
}
    
// No default command defined.
void Drive::InitDefaultCommand() {}

void Drive::driveWithJoystick(Joystick *stick) {
	drive->ArcadeDrive(stick);
}
When we run this on the robot only two Jaguars are solid, the other two keep blinking. We thought it was a hw problem but when we switch pwm connection cables on them still the same Jaguars are solid. I have no idea what may cause this problem.

Any last minute help would be much appreciated!
Reply With Quote