12#include <units/angle.h>
13#include <units/angular_velocity.h>
14#include <units/voltage.h>
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition CoreCANcoder.hpp:631
Magnet health as measured by CANcoder.
Definition SpnEnums.hpp:2830
Class to control the state of a simulated hardware::CANcoder.
Definition CANcoderSimState.hpp:32
ctre::phoenix::StatusCode SetSupplyVoltage(units::voltage::volt_t volts)
Sets the simulated supply voltage of the CANcoder.
ChassisReference Orientation
The orientation of the CANcoder relative to the robot chassis.
Definition CANcoderSimState.hpp:44
ctre::phoenix::StatusCode SetVelocity(units::angular_velocity::turns_per_second_t rps)
Sets the simulated velocity of the CANcoder.
CANcoderSimState & operator=(CANcoderSimState &&)=default
CANcoderSimState(CANcoderSimState const &)=delete
CANcoderSimState(hardware::core::CoreCANcoder const &device, ChassisReference orientation)
Creates an object to control the state of the given hardware::CANcoder.
CANcoderSimState(hardware::core::CoreCANcoder const &device)
Creates an object to control the state of the given hardware::CANcoder.
Definition CANcoderSimState.hpp:55
ctre::phoenix::StatusCode SetRawPosition(units::angle::turn_t rotations)
Sets the simulated raw position of the CANcoder.
ctre::phoenix::StatusCode AddPosition(units::angle::turn_t dRotations)
Adds to the simulated position of the CANcoder.
ctre::phoenix::StatusCode SetMagnetHealth(ctre::phoenix6::signals::MagnetHealthValue value)
Sets the simulated magnet health of the CANcoder.
CANcoderSimState(CANcoderSimState &&)=default
CANcoderSimState & operator=(CANcoderSimState const &)=delete
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
ChassisReference
Represents the orientation of a device relative to the robot chassis.
Definition ChassisReference.hpp:16
@ CounterClockwise_Positive
The device should read a counter-clockwise rotation as positive motion.
Definition StatusCodes.h:18