When declaring motor controllers we set our controlers to _slave.follow(_master); How can we temporally set the motor to independent if we wish to isolate them to test rotation and functionality without modifying the code.
It may look like. sudo code
init(){
_masterTalon = new TalonSRX(1);
_slaveTalon = new TalonSRX(2);
_slaveTalon.follow(_masterTalon);
}
public void test_slaveTalon (double speed){
_slaveTalon.dontFollow();
_slaveTalon.set(speed);
}
//Call this to reenable follow on slaveTalon when done
public void set_slaveTalonFollow(){
_slaveTalon.follow(_masterTalon);
}
That makes sense. I was to close to the problem to see the answer. Seeing that the _slave was set to follow in its own method I missed the fact this is like calling a different control mode could possibly take the motor back.
The point of setting it to coast also points out a angle I missed. If there are multiple motors in the system all of them should be set to coast it only one is going to be powering the system.
On the topic, we find it a good practice to put every Talon back into follower mode at the start of auto and tele so that
A) if we do any individual controller testing systems act normally when we go back into tele control
and
B) anything really weird happens on the CAN bus, we’re safe (I’ve heard some horror stories of some weird FMS* stuff knocking peoples Talons out of follower mode) (its too easy to not do)
*not sure it was FMS, I never got a full explanation, only overheard talk of the issue
Thanks for mentioning that. It was on my radar already but having a list of preset and a configure method to set everything. Do you place this reset in the Autoinit() and teliopinit()