pub struct VictorSPX { /* private fields */ }
Expand description

VEX Victor SPX Motor Controller when used on CAN Bus.

Trait Implementations§

Constructor. Read more
  • mode - Sets the appropriate output on the talon, depending on the mode.
  • demand0 - The output value to apply. such as advanced feed forward and/or auxiliary close-looping in firmware.
  • In PercentOutput, the output is between -1.0 and 1.0, with 0.0 as stopped.
  • In Current mode, output value is in amperes.
  • In Velocity mode, output value is in position change / 100ms.
  • In Position mode, output value is in encoder ticks or an analog value, depending on the sensor. See
  • In Follower mode, the output value is the integer device ID of the talon to duplicate.
  • demand1Type - The demand type for demand1.
  • demand1 - Supplmental output value. Units match the set mode.
  • Read more
    Neutral the motor output by setting control mode to disabled.
    Sets the mode of operation during neutral throttle output.
    Sets the phase of the sensor. Use when controller forward/reverse output doesn’t correlate to appropriate forward/reverse reading of sensor. Pick a value so that positive PercentOutput yields a positive change in sensor. After setting this, user can freely call set_inverted with any value. Read more
    Inverts the hbridge output of the motor controller. Read more
    Configures the Voltage Compensation saturation voltage. Read more
    Configures the voltage measurement filter. Read more
    Enable voltage compensation. If enabled, voltage compensation works in all control modes. Read more
    Gets the output percentage of the motor controller, in the interval [-1,+1].
    Gets the temperature of the motor controller in degrees Celsius.
    Select the remote feedback device for the motor controller. Most CTRE CAN motor controllers will support remote sensors over CAN. Read more
    The Feedback Coefficient is a scalar applied to the value of the feedback sensor. Useful when you need to scale your sensor values within the closed-loop calculations. Default value is 1. Read more
    Select what remote device and signal to assign to Remote Sensor 0 or Remote Sensor 1. After binding a remote device and signal to Remote Sensor X, you may select Remote Sensor X as a PID source for closed-loop features. Read more
    Select what sensor term should be bound to switch feedback device. Sensor Sum = Sensor Sum Term 0 - Sensor Sum Term 1 Sensor Difference = Sensor Diff Term 0 - Sensor Diff Term 1 The four terms are specified with this routine. Then Sensor Sum/Difference can be selected for closed-looping. Read more
    Get the selected sensor position (in raw sensor units).
    Configures the forward limit switch for a remote source. For example, a CAN motor controller may need to monitor the Limit-F pin of another Talon or CANifier. Read more
    Configures the reverse limit switch for a remote source. For example, a CAN motor controller may need to monitor the Limit-R pin of another Talon or CANifier. Read more
    Gets the derivative of the closed-loop error.
    Selects which profile slot to use for closed-loop control.
    Gets the active trajectory target position using MotionMagic/MotionProfile control modes.
    Gets the active trajectory target velocity using MotionMagic/MotionProfile control modes.
    Gets the active trajectory target heading using MotionMagic/MotionProfile control modes.
    Sets the Motion Magic Cruise Velocity. This is the peak target velocity that the motion magic curve generator can use. Read more
    Sets the Motion Magic Acceleration. This is the target acceleration that the motion magic curve generator can use. Read more
    Clear the buffered motion profile in both motor controller’s RAM (bottom), and in the API (top). Read more
    Retrieve just the buffer count for the api-level (top) buffer. This routine performs no CAN or data structure lookups, so its fast and ideal if caller needs to quickly poll the progress of trajectory points being emptied into motor controller’s RAM. Otherwise just use get_motion_profile_status. Read more
    Push another trajectory point into the top level buffer (which is emptied into the motor controller’s bottom buffer as room allows). Read more
    Retrieve just the buffer full for the api-level (top) buffer. This routine performs no CAN or data structure lookups, so its fast and ideal if caller needs to quickly poll. Otherwise just use get_motion_profile_status. Read more
    This must be called periodically to funnel the trajectory points from the API’s top level buffer to the controller’s bottom level buffer. Recommendation is to call this twice as fast as the execution rate of the motion profile. So if MP is running with 20ms trajectory points, try calling this routine every 10ms. All motion profile functions are thread-safe through the use of a mutex, so there is no harm in having the caller utilize threading. Read more
    Retrieve all status information. For best performance, Caller can snapshot all status information regarding the motion profile executer. Read more
    Get all motion profile status information. This returns a new MotionProfileStatus. See get_motion_profile_status. Read more
    Clear the “Has Underrun” flag. Typically this is called after application has confirmed an underrun had occured. Read more
    Calling application can opt to speed up the handshaking between the robot API and the controller to increase the download rate of the controller’s Motion Profile. Ideally the period should be no more than half the period of a trajectory point. Read more
    When trajectory points are processed in the motion profile executer, the MPE determines how long to apply the active trajectory point by summing base_traj_duration_ms with the time_dur of the trajectory point (see TrajectoryPoint). Read more
    Gets the last error generated by this object. Not all functions return an error code but can potentially report errors. This function can be used to retrieve those error codes. Read more
    Gets the firmware version of the device. Read more
    Returns true if the device has reset since last call.
    Sets the value of a custom parameter. This is for arbitrary use. Read more
    Gets the value of a custom parameter. Read more
    Sets a parameter. Generally this is not used. This can be utilized in Read more
    Set the control mode and output value so that this motor controller will follow another motor controller. Currently supports following Victor SPX and Talon SRX. Read more
    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Gets the TypeId of self. Read more
    Immutably borrows from an owned value. Read more
    Mutably borrows from an owned value. Read more

    Returns the argument unchanged.

    Calls U::from(self).

    That is, this conversion is whatever the implementation of From<T> for U chooses to do.

    The type returned in the event of a conversion error.
    Performs the conversion.
    The type returned in the event of a conversion error.
    Performs the conversion.