Artifact artf4170 : CANTalon (and CanTalonSRX) don't disable motor on destruction
Tracker:Bugs
Title:
CANTalon (and CanTalonSRX) don't disable motor on destruction
Description:
Created By:James Kuszmaul(deleted)
Created On:07/23/2015 9:17 PM GMT
Last Modified:07/27/2015 6:06 PM GMT

Status / Comments Change Log Associations Dependencies Attachments  
 (3 Items)
ActionSort Field2Sort Down Old ValueSort New Value3Sort Down DateSort Performed By1Sort Down
Select Date
Update Assigned To None James Kuszmaul(deleted)
07/24/2015 1:31 PM GMT James Kuszmaul(deleted)
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)
Update Status
Open
In Progress
07/27/2015 6:06 PM GMT James Kuszmaul(deleted)