Go to Post Let's leave the football uniforms at home though, teams. ... The last thing I want to see is Baker in Brett Favre yellow spandex... *shudder* - Amanda Morrison [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 12-02-2010, 01:19
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 159
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Question CANJaguar for C++: Missing mode init messages?

This is really a question for Joe, because I know he's most likely lurking around these parts , but if anyone else knows the answer, please chime in.

We are planning to use Speed mode on our Jags (2Can-driven). I was reviewing the latest CANJaguar.cpp code (from FIRSTForge source), and noticed that in the InitJaguar() method, there is a switch statement that sends a control mode initialization message to the Jaguar. However, this is only done for Voltage mode, and no others.

My question: Is this an oversight, or do the other control modes indeed require no initialization message? I compared against the Java code, and in there, an init message is sent for each mode.

Like I said, we are "planning" to use Speed mode (still getting our encoders hooked up), otherwise I would just test this out to see if it actually makes a difference. I assume that someone else already has, and so if you have, did you have to change the C++ code to add in the init for the other modes?

Thanks in advance for any help!
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2010, 11:42
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: CANJaguar for C++: Missing mode init messages?

Quote:
Originally Posted by Abrakadabra View Post
This is really a question for Joe, because I know he's most likely lurking around these parts , but if anyone else knows the answer, please chime in.

We are planning to use Speed mode on our Jags (2Can-driven). I was reviewing the latest CANJaguar.cpp code (from FIRSTForge source), and noticed that in the InitJaguar() method, there is a switch statement that sends a control mode initialization message to the Jaguar. However, this is only done for Voltage mode, and no others.

My question: Is this an oversight, or do the other control modes indeed require no initialization message? I compared against the Java code, and in there, an init message is sent for each mode.

Like I said, we are "planning" to use Speed mode (still getting our encoders hooked up), otherwise I would just test this out to see if it actually makes a difference. I assume that someone else already has, and so if you have, did you have to change the C++ code to add in the init for the other modes?

Thanks in advance for any help!
For the closed-loop control modes (non-voltage modes), the initialization is done in EnableControl().
My guess is it is done this way due to the extra bits of information needed for some of the modes before or as those modes are enabled (encoder initial position, position mode reference).
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2010, 01:18
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 159
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Re: CANJaguar for C++: Missing mode init messages?

Thanks for the answer! Guess I shoulda dug a little deeper.

What threw me off was the use of a switch() statement for a single case and in a place where there was no intent of ever adding additional cases. Usually you would just see a single if() statement to check the value, rather than the extra complication of a switch().
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
TeleOp Init/Stop vs. Auton-Iterative Init/Stop Ziaholic NI LabVIEW 11 07-02-2010 22:19
CANJaguar + BlackJagBridge plugin errors Shinigami2057 CAN 1 06-02-2010 11:20
Wierd basic init Jeremy J Programming 5 06-02-2003 11:42
Basic Init Error yan184 Programming 5 14-12-2002 13:10


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

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