12#include "wpi/units/angle.hpp"
13#include "wpi/units/time.hpp"
90 wpi::units::degree_t maxAngle);
102 wpi::units::microsecond_t maxPwm);
114 wpi::units::microsecond_t GetFullRangeScaleFactor();
115 wpi::units::degree_t GetServoAngleRange();
120 wpi::units::degree_t m_maxServoAngle = 180.0_deg;
121 wpi::units::degree_t m_minServoAngle = 0.0_deg;
123 wpi::units::microsecond_t m_minPwm = 600_us;
124 wpi::units::microsecond_t m_maxPwm = 2400_us;
126 bool m_reversed =
false;
This class controls a REV ExpansionHub plugged in over USB to Systemcore.
Definition ExpansionHub.hpp:18
void SetPWMRange(wpi::units::microsecond_t minPwm, wpi::units::microsecond_t maxPwm)
Sets the PWM range for the servo.
ExpansionHubServo(int usbId, int channel)
Constructs a servo at the requested channel on a specific USB port.
void SetPosition(double value)
Set the servo position.
void SetAngleRange(wpi::units::degree_t minAngle, wpi::units::degree_t maxAngle)
Sets the angle range for the SetAngle call.
void SetReversed(bool reversed)
Sets whether the servo is reversed.
void SetAngle(wpi::units::degree_t angle)
Sets the servo angle.
void SetPulseWidth(wpi::units::microsecond_t pulseWidth)
Sets the raw pulse width output on the servo.
void SetFramePeriod(wpi::units::microsecond_t framePeriod)
Sets the frame period for the servo.
~ExpansionHubServo() noexcept
void SetEnabled(bool enabled)
Sets if the servo output is enabled or not.
bool IsHubConnected() const
Gets if the underlying ExpansionHub is connected.
Definition ExpansionHubServo.hpp:78
NetworkTables Boolean publisher.
Definition BooleanTopic.hpp:126
NetworkTables Integer publisher.
Definition IntegerTopic.hpp:126
Definition CvSource.hpp:15