Closed trindels closed 1 year ago
The C++ version of the CTRE libraries do not support this for WPI_TalonSRX
:
WPI_TalonSRX.h:
class WPI_TalonSRX : public virtual TalonSRX,
public virtual WPI_BaseMotorController
{
public:
/**
* Constructor for a WPI_TalonSRX
* @param deviceNumber Device ID of TalonSRX
*/
WPI_TalonSRX(int deviceNumber);
virtual ~WPI_TalonSRX();
WPI_TalonSRX() = delete;
WPI_TalonSRX(WPI_TalonSRX const &) = delete;
WPI_TalonSRX &operator=(WPI_TalonSRX const &) = delete;
As pointed out, TalonSRX
does, but only not on roboRIO:
class TalonSRX : public virtual BaseTalon
{
private:
public:
/**
* Constructor for a Talon
* @param deviceNumber CAN Device ID of TalonSRX
*/
TalonSRX(int deviceNumber);
#ifndef __FRC_ROBORIO__
/**
* Constructor so non-FRC platforms can specify a CAN 2.0 socketcan bus
* @param deviceNumber CAN Device ID of TalonSRX
* @param canbus String specifying the bus
*/
TalonSRX(int deviceNumber, std::string const &canbus);
#endif
Unfortunately, that constructor isn't accessible in the child class WPI_TalonSRX. Please contact the vendor and have them fix their library.
Problem description
WPI_TalonSRX does not support providing the canbus property. This is needed for operating on a CANivore instead of the RoboRIO. The TalonSRX and BaseTalon support this property. WPI_TalonFX supports this property as well. Please update in order to propertly support compatibility.
self.motor = WPI_TalonSRX( 22, canbus="rio" )
Operating System
Windows, RoboRIO
Installed Python Packages
Reproducible example code