13#include "wpi/units/current.hpp"
14#include "wpi/units/voltage.hpp"
This class controls a REV ExpansionHub plugged in over USB to Systemcore.
Definition ExpansionHub.hpp:18
void SetFloatOn0(bool floatOn0)
Sets if the motor should float or brake when 0 is commanded.
void Follow(const ExpansionHubMotor &leader)
Sets this motor to follow another motor on the same hub.
ExpansionHubMotor(int usbId, int channel)
Constructs a servo at the requested channel on a specific USB port.
void SetThrottle(double throttle)
Sets the throttle.
void SetPositionSetpoint(double setpoint)
Command the motor to drive to a specific position setpoint.
~ExpansionHubMotor() noexcept
ExpansionHubPositionConstants & GetPositionConstants()
Gets the PID constants object for position PID.
void SetVoltage(wpi::units::volt_t voltage)
Sets the voltage to run the motor at.
void SetEnabled(bool enabled)
Sets if the motor output is enabled or not.
void SetVelocitySetpoint(double setpoint)
Command the motor to drive to a specific velocity setpoint.
void SetDistancePerCount(double perCount)
Sets the distance per count of the encoder.
void SetReversed(bool reversed)
Sets if the motor and encoder should be reversed.
wpi::units::ampere_t GetCurrent() const
Gets the current being pulled by the motor.
double GetEncoderPosition() const
Gets the current position of the motor encoder.
double GetEncoderVelocity() const
Gets the current velocity of the motor encoder.
void ResetEncoder()
Reset the encoder count to 0.
ExpansionHubVelocityConstants & GetVelocityConstants()
Gets the PID constants object for velocity PID.
bool IsHubConnected()
Gets if the underlying ExpansionHub is connected.
Definition ExpansionHubMotor.hpp:138
This class contains feedback and feedforward constants for an ExpansionHub motor.
Definition ExpansionHubPositionConstants.hpp:15
This class contains feedback and feedforward constants for an ExpansionHub motor.
Definition ExpansionHubVelocityConstants.hpp:14
NetworkTables Boolean publisher.
Definition BooleanTopic.hpp:126
NetworkTables Double publisher.
Definition DoubleTopic.hpp:126
NetworkTables Double subscriber.
Definition DoubleTopic.hpp:33
NetworkTables Integer publisher.
Definition IntegerTopic.hpp:126
Definition CvSource.hpp:15