View Single Post
  #1   Spotlight this post!  
Unread 09-11-2010, 17:35
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Joystick motion to CAN connected jaguar

Well if it returns zero during the actual running of the code and the 2CAN can retrieve a version and it doesn't work over Serial but everything works in LabVIEW, then there must be a problem in the CANJaguar.cpp file.

2 parts to this one:

Marshal: In LabVIEW's Get Firmware Version, is 0x80000000 OR'd into the ID?

sam: Go into the function GetFirmwareVersion in CANJaguar.cpp (line 866 for me) and replace this line with a different version:

Code:
ORIGINAL:
	// Set the MSB to tell the 2CAN that this is a remote message.
	getTransaction(0x80000000 | CAN_MSGID_API_FIRMVER, dataBuffer, &dataSize);

REPLACE WITH:
	// REMOVED: Set the MSB to tell the 2CAN that this is a remote message.
	getTransaction(CAN_MSGID_API_FIRMVER, dataBuffer, &dataSize);
That ORing only occurs in the GetFirmwareVersion function and seems to be the only thing that sets it apart from any other message. Also looking back through the revision logs on svn that code was introduced around the same time I started seeing the problem.

EDIT: It appears that Java had the same problem at one point and the firmware check was bypassed as a workaround
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote