Go to Post And people laugh at me when I suggest 14" wheels. - Munchskull [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
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 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
  #2   Spotlight this post!  
Unread 09-11-2010, 20:21
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Joystick motion to CAN connected jaguar

Quote:
Originally Posted by Radical Pi View Post
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
No, the OR is not there in the LabVIEW version.
There is just the decimal value 512 ORed with the device number.
In hexadecimal, that should be 0x0b00

What's weird about ORing 0x80000000 is that it makes TRUE the highest bit of the Arbitration ID. The highest 3 bits of the arbitration ID should be reserved.

By all means, take it out, and comment what and why you did.
__________________
-- Marshal Horn
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we detect if PSoC is connected or not ? gokul Programming 5 03-03-2010 11:24
CAN Jaguar enhancements JasonStern CAN 10 01-03-2010 09:38
CAN Jaguar Malfunction PranavSathy CAN 4 21-02-2010 18:32
Joystick To Jaguar Taxi Quinn Programming 1 17-02-2010 11:12
Using the same Jaguar/Controller for Joystick and buttons.... mck567 NI LabVIEW 2 09-02-2010 16:34


All times are GMT -5. The time now is 02:50.

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