View Single Post
  #22   Spotlight this post!  
Unread 26-01-2010, 19:15
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Re: Black jaguars: not working

I tried it with the 2CAN bus. Now, instead of giving me error messages, it just silently fails. I've updated the firmware on the 2CAN, but it still doesn't work. Any ideas? Here's the code I'm using:

Code:
#include "WPILib.h"
#include "2CAN.h"



class Spy : public SimpleRobot
{
	JaguarOverCAN  *mtr;

public:
	Spy(void)
	{
		GetWatchdog().SetEnabled(false);
	}

	void Autonomous(void)
	{

	}

	void OperatorControl(void)
	{
		mtr = new JaguarOverCAN (2);
		while (true) {
			mtr->Set(0.5);
			Wait(0.5);
		}
	}
};
EDIT: I tried visiting the 2CAN's web page at 10.15.40.10. I was able to see that both the 2CAN and the Jaguar are at least partially set up correctly, that the Jaguar is getting power and that it is on ID 2.

Last edited by ellisk : 26-01-2010 at 19:40.
Reply With Quote