Go to Post The season ended. Not cool. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #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
Reply


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 12:28.

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