Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Problem with Jaguar control on drivetrain (http://www.chiefdelphi.com/forums/showthread.php?t=103413)

Jun8 20-02-2012 17:15

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!


All times are GMT -5. The time now is 17:40.

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