CANVenom

class playingwithfusion.CANVenom(motorID: SupportsInt | SupportsIndex)

Bases: MotorSafety, MotorController, Sendable

class BrakeCoastMode(value: SupportsInt | SupportsIndex)

Bases: pybind11_object

Members:

kCoast

kBrake

kBrake = <BrakeCoastMode.kBrake: 1>
kCoast = <BrakeCoastMode.kCoast: 0>
CANVenom.BrakeCoastMode.name -> str
property value
class ControlMode(value: SupportsInt | SupportsIndex)

Bases: pybind11_object

Members:

kDisabled

kProportional

kCurrentControl

kSpeedControl

kPositionControl

kMotionProfile

kFollowTheLeader

kVoltageControl

kCurrentControl = <ControlMode.kCurrentControl: 3>
kDisabled = <ControlMode.kDisabled: 0>
kFollowTheLeader = <ControlMode.kFollowTheLeader: 7>
kMotionProfile = <ControlMode.kMotionProfile: 6>
kPositionControl = <ControlMode.kPositionControl: 5>
kProportional = <ControlMode.kProportional: 1>
kSpeedControl = <ControlMode.kSpeedControl: 4>
kVoltageControl = <ControlMode.kVoltageControl: 8>
CANVenom.ControlMode.name -> str
property value
class FaultFlag(value: SupportsInt | SupportsIndex)

Bases: pybind11_object

Members:

kNone

kNoHeartbeat

kNoLeaderHeartbeat

kBadLeaderID

kHighTemperature

kHighCurrent

kBadMode

kDuplicateID

kForwardLimit

kReverseLimit

kReset

kBadLeaderID = <FaultFlag.kBadLeaderID: 4>
kBadMode = <FaultFlag.kBadMode: 32>
kDuplicateID = <FaultFlag.kDuplicateID: 64>
kForwardLimit = <FaultFlag.kForwardLimit: 128>
kHighCurrent = <FaultFlag.kHighCurrent: 16>
kHighTemperature = <FaultFlag.kHighTemperature: 8>
kNoHeartbeat = <FaultFlag.kNoHeartbeat: 1>
kNoLeaderHeartbeat = <FaultFlag.kNoLeaderHeartbeat: 2>
kNone = <FaultFlag.kNone: 0>
kReset = <FaultFlag.kReset: 512>
kReverseLimit = <FaultFlag.kReverseLimit: 256>
CANVenom.FaultFlag.name -> str
property value
class MotionProfileState(value: SupportsInt | SupportsIndex)

Bases: pybind11_object

Members:

kInit

kRunning

kErrBufferCleared

kErrBufferUnderflow

kErrBufferInvalid

kDone

kDone = <MotionProfileState.kDone: 5>
kErrBufferCleared = <MotionProfileState.kErrBufferCleared: 2>
kErrBufferInvalid = <MotionProfileState.kErrBufferInvalid: 4>
kErrBufferUnderflow = <MotionProfileState.kErrBufferUnderflow: 3>
kInit = <MotionProfileState.kInit: 0>
kRunning = <MotionProfileState.kRunning: 1>
CANVenom.MotionProfileState.name -> str
property value
PIDWrite(output: SupportsFloat | SupportsIndex) None
addMotionProfilePoint(time: SupportsFloat | SupportsIndex, speed: SupportsFloat | SupportsIndex, position: SupportsFloat | SupportsIndex) None
clearLatchedFaults() None
clearMotionProfilePoints() None
completeMotionProfilePath(time: SupportsFloat | SupportsIndex, position: SupportsFloat | SupportsIndex) None
disable() None
enable() None
enableLimitSwitches(fwdLimitSwitchEnabled: bool, revLimitSwitchEnabled: bool) None
executePath() None
follow(leadVenom: playingwithfusion._playingwithfusion.CANVenom) None
get() float
getActiveControlMode() playingwithfusion._playingwithfusion.CANVenom.ControlMode
getActiveFaults() playingwithfusion._playingwithfusion.CANVenom.FaultFlag
getAuxVoltage() float
getB() float
getBrakeCoastMode() playingwithfusion._playingwithfusion.CANVenom.BrakeCoastMode
getBusVoltage() float
getControlMode() playingwithfusion._playingwithfusion.CANVenom.ControlMode
getCurrentMotionProfilePoint() int
getDescription() str
getDutyCycle() float
getFirmwareVersion() int
getFwdLimitSwitchActive() bool
getInverted() bool
getKD() float
getKF() float
getKI() float
getKP() float
getLatchedFaults() playingwithfusion._playingwithfusion.CANVenom.FaultFlag
getMaxAcceleration() float
getMaxJerk() float
getMaxPILimit() float
getMaxSpeed() float
getMinPILimit() float
getMotionProfileIsValid() bool
getMotionProfilePositionTarget() float
getMotionProfileSpeedTarget() float
getMotionProfileState() playingwithfusion._playingwithfusion.CANVenom.MotionProfileState
getNumAvaliableMotionProfilePoints() int
getOutputCurrent() float
getOutputVoltage() float
getPIDTarget() float
getPosition() float
getRevLimitSwitchActive() bool
getSerialNumber() int
getSpeed() float
getTemperature() float
identifyMotor() None
initSendable(builder: wpiutil._wpiutil.SendableBuilder) None
resetPosition() None
set(command: SupportsFloat | SupportsIndex) None
setB(b: SupportsFloat | SupportsIndex) None
setBrakeCoastMode(brakeCoastMode: playingwithfusion._playingwithfusion.CANVenom.BrakeCoastMode) None
setCommand(*args, **kwargs)

Overloaded function.

  1. setCommand(self: playingwithfusion._playingwithfusion.CANVenom, mode: playingwithfusion._playingwithfusion.CANVenom.ControlMode, command: typing.SupportsFloat | typing.SupportsIndex) -> None

  2. setCommand(self: playingwithfusion._playingwithfusion.CANVenom, mode: playingwithfusion._playingwithfusion.CANVenom.ControlMode, command: typing.SupportsFloat | typing.SupportsIndex, kF: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex) -> None

setControlMode(controlMode: playingwithfusion._playingwithfusion.CANVenom.ControlMode) None
setInverted(isInverted: bool) None
setKD(kD: SupportsFloat | SupportsIndex) None
setKF(kF: SupportsFloat | SupportsIndex) None
setKI(kI: SupportsFloat | SupportsIndex) None
setKP(kP: SupportsFloat | SupportsIndex) None
setMaxAcceleration(limit: SupportsFloat | SupportsIndex) None
setMaxJerk(limit: SupportsFloat | SupportsIndex) None
setMaxPILimit(limit: SupportsFloat | SupportsIndex) None
setMaxSpeed(limit: SupportsFloat | SupportsIndex) None
setMinPILimit(limit: SupportsFloat | SupportsIndex) None
setPID(kP: SupportsFloat | SupportsIndex, kI: SupportsFloat | SupportsIndex, kD: SupportsFloat | SupportsIndex, kF: SupportsFloat | SupportsIndex, b: SupportsFloat | SupportsIndex) None
setPosition(newPosition: SupportsFloat | SupportsIndex) None
stopMotor() None