10#include <wpi/units/frequency.hpp>
11#include <wpi/units/time.hpp>
12#include <wpi/units/angular_velocity.hpp>
13#include <wpi/units/angular_acceleration.hpp>
14#include <wpi/units/dimensionless.hpp>
27 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
44 wpi::units::turns_per_second_squared_t
Acceleration = 0.0_tr_per_s_sq;
162 constexpr std::string_view
GetName()
const override
164 return "VelocityDutyCycle";
261 Slot = std::move(newSlot);
constexpr ControlRequest(ControlRequest const &)=default
int Slot
Select which gains are applied by selecting the slot.
Definition VelocityDutyCycle.hpp:72
wpi::units::turns_per_second_squared_t Acceleration
Acceleration to drive toward in rotations per second squared.
Definition VelocityDutyCycle.hpp:44
constexpr VelocityDutyCycle & WithAcceleration(wpi::units::turns_per_second_squared_t newAcceleration)
Modifies this Control Request's Acceleration parameter and returns itself for method-chaining and eas...
Definition VelocityDutyCycle.hpp:198
constexpr VelocityDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition VelocityDutyCycle.hpp:223
wpi::units::turns_per_second_t Velocity
Velocity to drive toward in rotations per second.
Definition VelocityDutyCycle.hpp:36
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition VelocityDutyCycle.hpp:79
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition VelocityDutyCycle.hpp:114
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition VelocityDutyCycle.hpp:104
wpi::units::scalar_t FeedForward
Feedforward to apply in fractional units between -1 and +1.
Definition VelocityDutyCycle.hpp:66
constexpr VelocityDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition VelocityDutyCycle.hpp:294
constexpr VelocityDutyCycle & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition VelocityDutyCycle.hpp:259
constexpr VelocityDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition VelocityDutyCycle.hpp:311
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr VelocityDutyCycle(wpi::units::turns_per_second_t Velocity)
Request PID to target velocity with duty cycle feedforward.
Definition VelocityDutyCycle.hpp:151
constexpr VelocityDutyCycle & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition VelocityDutyCycle.hpp:355
constexpr VelocityDutyCycle & WithVelocity(wpi::units::turns_per_second_t newVelocity)
Modifies this Control Request's Velocity parameter and returns itself for method-chaining and easier ...
Definition VelocityDutyCycle.hpp:179
constexpr VelocityDutyCycle & WithUpdateFreqHz(wpi::units::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition VelocityDutyCycle.hpp:399
wpi::units::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition VelocityDutyCycle.hpp:140
constexpr VelocityDutyCycle & WithFeedForward(wpi::units::scalar_t newFeedForward)
Modifies this Control Request's FeedForward parameter and returns itself for method-chaining and easi...
Definition VelocityDutyCycle.hpp:242
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition VelocityDutyCycle.hpp:58
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition VelocityDutyCycle.hpp:162
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition VelocityDutyCycle.hpp:91
constexpr VelocityDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition VelocityDutyCycle.hpp:277
constexpr VelocityDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition VelocityDutyCycle.hpp:334
std::string ToString() const override
Returns a string representation of the object.
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition VelocityDutyCycle.hpp:125
constexpr ~VelocityDutyCycle() override
Definition VelocityDutyCycle.hpp:155
bool LimitForwardMotion
Set to true to force forward limiting.
Definition VelocityDutyCycle.hpp:85
constexpr VelocityDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition VelocityDutyCycle.hpp:377
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition MotionMagicDutyCycle.hpp:17
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14