Go to Post One wouldn't want to keep the red herring in hand, that gets kind of stinky. - GaryVoshol [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-01-2010, 18:07
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
New Jaguars on CAN bus

I'm trying to get the code for the new Jaguars to compile in C++ using Windriver. Here is my setup and the errors I'm getting:

I got the sources for the CAN jaguar code off of http://firstforge.wpi.edu/sf/frs/do/...r_c_revision_6
I then imported the files "CANJaguar.cpp", "can_proto.h", "CANJaguar.h", and "JaguarCANDriver.h" into my project. In the file which I wanted to use the new Jaguars, I put:
Code:
#include "CANJaguar.h"
When I compiled my new project, I got a ton of compiler errors. They were:
Code:
In file included from C:/windriver/workspace/Spy/CANJaguar.cpp:3:
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:13: error: `tNIRIO_i32' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:16: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:19: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:28: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:35: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:38: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:47: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:50: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:53: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:56: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:64: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:67: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:70: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:74: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:78: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:84: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:87: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:90: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:98: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:101: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:104: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:107: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:110: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:117: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:120: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:123: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:130: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:133: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:136: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:143: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:146: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:149: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:152: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:162: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:165: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:168: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:171: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:174: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:177: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:180: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:183: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:186: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:189: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:192: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:195: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:198: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:206: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:209: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:212: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:215: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:218: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:221: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:224: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:227: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:230: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:233: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:236: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:239: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:242: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:245: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:248: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:251: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:258: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:261: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:264: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:267: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:270: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:277: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:280: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:287: error: `tRioStatusCode' does not name a type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:293: error: expected `,' or `...' before "status"
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:294: error: ISO C++ forbids declaration of `tRioStatusCode' with no type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h: In function `bool rioStatusIsFatal(int)':
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:295: error: `status' undeclared (first use this function)
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:295: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h: At global scope:
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:298: error: expected `,' or `...' before "status"
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:299: error: ISO C++ forbids declaration of `tRioStatusCode' with no type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h: In function `bool rioStatusIsNotFatal(int)':
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:300: error: `status' undeclared (first use this function)
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h: At global scope:
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:306: error: expected `,' or `...' before "newStatus"
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:307: error: ISO C++ forbids declaration of `tRioStatusCode' with no type
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h: In function `T& rioSetStatus(T&, int)':
C:/WindRiver/vxworks-6.3/target/h/WPILib/ChipObject/NiRioStatus.h:308: error: `newStatus' undeclared (first use this function)
C:/windriver/workspace/Spy/CANJaguar.cpp: In member function `void CANJaguar::InitJaguar()':
C:/windriver/workspace/Spy/CANJaguar.cpp:31: error: `kRIOStatusVersionMismatch' undeclared (first use this function)
C:\WindRiver\vxworks-6.3\host\x86-win32\bin\make.exe: *** [SimpleTemplate_partialImage/Debug/Objects/Spy/CANJaguar.o] Error 1
Build Failed in Project 'Spy' (Process Exit Value was 2):   2010-01-20 14:45:55   (Elapsed Time: 00:01)
Does anyone know what's wrong?

Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2010, 19:16
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: New Jaguars on CAN bus

modify the include header in CANJaguar.cpp
#include "CANJaguar.h"
#include "ChipObject/NiRio.h" <-add this line
#include "ChipObject/NiRioStatus.h"
...
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2010, 20:47
woodk woodk is offline
Registered User
FRC #2809
 
Join Date: Jan 2009
Location: Kingston, Ontario, Canada
Posts: 31
woodk has a spectacular aura aboutwoodk has a spectacular aura aboutwoodk has a spectacular aura about
Re: New Jaguars on CAN bus

Quote:
Originally Posted by byteit101 View Post
modify the include header in CANJaguar.cpp
#include "CANJaguar.h"
#include "ChipObject/NiRio.h" <-add this line
#include "ChipObject/NiRioStatus.h"
...
You beat me to it! You'll also find that it only supports the Voltage control mode. Too bad
Reply With Quote
  #4   Spotlight this post!  
Unread 20-01-2010, 21:00
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: New Jaguars on CAN bus

Quote:
Originally Posted by woodk View Post
You'll also find that it only supports the Voltage control mode. Too bad
If you install the firmware development package from http://www.luminarymicro.com/products/mdl_bdc.html in the docs folder it has the CAN protocol spec, so you could implement whatever mode you want.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2010, 09:53
woodk woodk is offline
Registered User
FRC #2809
 
Join Date: Jan 2009
Location: Kingston, Ontario, Canada
Posts: 31
woodk has a spectacular aura aboutwoodk has a spectacular aura aboutwoodk has a spectacular aura about
Re: New Jaguars on CAN bus

Quote:
Originally Posted by Joe Ross View Post
If you install the firmware development package from http://www.luminarymicro.com/products/mdl_bdc.html in the docs folder it has the CAN protocol spec, so you could implement whatever mode you want.
Thanks! I figured most of that out by monitoring the communication between BDCOM and the Jaguar, but that doc is much easier!

However, it doesn't include the modifications made in the FRC firmware, which we are required to use. I have managed to get speed control working with the FRC firmware, but they seem to have done something to the current control that I haven't figured out yet.

- Kevin
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
Serial to CAN Gateway in new Black Jaguars? dmcguire3006 Electrical 54 26-01-2010 07:32
How can we drive on this new floor? sPod General Forum 177 14-01-2009 06:34
Can anyone create new commands? Jakenan Programming 5 22-01-2005 21:38
Where can I find the new C compiler? CompMaster Programming 2 13-01-2005 02:28


All times are GMT -5. The time now is 14:20.

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