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!

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).

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().