View Single Post
  #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