12#include "wpi/units/angle.hpp"
13#include "wpi/units/time.hpp"
37 void Set(
double value);
88 wpi::units::degree_t maxAngle);
100 wpi::units::microsecond_t maxPwm);
122 wpi::units::microsecond_t GetFullRangeScaleFactor();
123 wpi::units::degree_t GetServoAngleRange();
128 wpi::units::degree_t m_maxServoAngle = 180.0_deg;
129 wpi::units::degree_t m_minServoAngle = 0.0_deg;
131 wpi::units::microsecond_t m_minPwm = 600_us;
132 wpi::units::microsecond_t m_maxPwm = 2400_us;
134 bool m_reversed =
false;
135 bool m_continousMode =
false;
This class controls a REV ExpansionHub plugged in over USB to Systemcore.
Definition ExpansionHub.hpp:17
void Set(double value)
Set the servo position.
void SetContinousRotationMode(bool enable)
Enables or disables continuous rotation mode.
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 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:76
NetworkTables Boolean publisher.
Definition BooleanTopic.hpp:127
NetworkTables Integer publisher.
Definition IntegerTopic.hpp:127
Definition CvSource.hpp:15