Update |
Description
|
When the CANTalon object is destroyed, it is not
disabled and it continues doing whatever it did
before. Specifically, I tested this with the
default percent mode, where I would have code
along the following lines:
{
CANTalon foo(0);
Jaguar bar(2);
bar.Set(0.1);
foo.Set(0.1);
Wait(1.0);
}
Wait(10.0);
In this case, the normal PWM speed controller (in
this case, a Jaguar, could also be a Victor or
Talon SR) will briefly go forwards and then turn
off after a second when the object goes out of
scope. However, the CANTalon will turn on and stay
on until the robot is disabled.
This seems like the wrong behavior and I'm not
sure what the best option is--I could quickly
stick a call to Disable() in the CANTalon
destructor; the other option would be for
something to happen in CanTalonSRX (at the hal
level) or somewhere in the motor controller itself
.
|
When the CANTalon object is destroyed, it is not
disabled and it continues doing whatever it did
before. Specifically, I tested this with the
default percent mode, where I would have code
along the following lines:
{
CANTalon foo(0);
Jaguar bar(2);
bar.Set(0.1);
foo.Set(0.1);
Wait(1.0);
}
Wait(10.0);
In this case, the normal PWM speed controller (in
this case, a Jaguar, could also be a Victor or
Talon SR) will briefly go forwards and then turn
off after a second when the object goes out of
scope. However, the CANTalon will turn on and stay
on until the robot is disabled.
This seems like the wrong behavior and I'm not
sure what the best option is--I could quickly
stick a call to Disable() in the CANTalon
destructor; the other option would be for
something to happen in CanTalonSRX (at the hal
level) or somewhere in the motor controller itself
.
Edit: Presumably this is an issue in Java as well,
so any change would have to ensure that it got
both languages.
|
07/23/2015 9:26 PM GMT |
James Kuszmaul(deleted) |