10#include <units/frequency.h>
11#include <units/time.h>
12#include <units/angular_velocity.h>
13#include <units/angular_acceleration.h>
14#include <units/dimensionless.h>
39 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
49 units::angular_velocity::turns_per_second_t
Velocity;
59 units::angular_acceleration::turns_per_second_squared_t
Acceleration = 0.0_tr_per_s_sq;
193 constexpr std::string_view
GetName()
const override
195 return "MotionMagicVelocityDutyCycle";
295 Slot = std::move(newSlot);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Requests Motion Magic® to target a final velocity using a motion profile.
Definition MotionMagicVelocityDutyCycle.hpp:38
units::dimensionless::scalar_t FeedForward
Feedforward to apply in fractional units between -1 and +1.
Definition MotionMagicVelocityDutyCycle.hpp:81
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition MotionMagicVelocityDutyCycle.hpp:129
constexpr MotionMagicVelocityDutyCycle & WithVelocity(units::angular_velocity::turns_per_second_t newVelocity)
Modifies this Control Request's Velocity parameter and returns itself for method-chaining and easier ...
Definition MotionMagicVelocityDutyCycle.hpp:211
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition MotionMagicVelocityDutyCycle.hpp:193
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition MotionMagicVelocityDutyCycle.hpp:140
constexpr ~MotionMagicVelocityDutyCycle() override
Definition MotionMagicVelocityDutyCycle.hpp:186
constexpr MotionMagicVelocityDutyCycle & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition MotionMagicVelocityDutyCycle.hpp:433
units::angular_velocity::turns_per_second_t Velocity
Target velocity to drive toward in rotations per second.
Definition MotionMagicVelocityDutyCycle.hpp:49
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition MotionMagicVelocityDutyCycle.hpp:106
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition MotionMagicVelocityDutyCycle.hpp:119
constexpr MotionMagicVelocityDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition MotionMagicVelocityDutyCycle.hpp:311
constexpr MotionMagicVelocityDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition MotionMagicVelocityDutyCycle.hpp:257
std::string ToString() const override
Returns a string representation of the object.
int Slot
Select which gains are applied by selecting the slot.
Definition MotionMagicVelocityDutyCycle.hpp:87
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition MotionMagicVelocityDutyCycle.hpp:155
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition MotionMagicVelocityDutyCycle.hpp:73
units::angular_acceleration::turns_per_second_squared_t Acceleration
This is the absolute Acceleration to use generating the profile.
Definition MotionMagicVelocityDutyCycle.hpp:59
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition MotionMagicVelocityDutyCycle.hpp:94
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr MotionMagicVelocityDutyCycle & WithAcceleration(units::angular_acceleration::turns_per_second_squared_t newAcceleration)
Modifies this Control Request's Acceleration parameter and returns itself for method-chaining and eas...
Definition MotionMagicVelocityDutyCycle.hpp:232
bool LimitForwardMotion
Set to true to force forward limiting.
Definition MotionMagicVelocityDutyCycle.hpp:100
constexpr MotionMagicVelocityDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition MotionMagicVelocityDutyCycle.hpp:328
constexpr MotionMagicVelocityDutyCycle & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition MotionMagicVelocityDutyCycle.hpp:293
constexpr MotionMagicVelocityDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition MotionMagicVelocityDutyCycle.hpp:368
constexpr MotionMagicVelocityDutyCycle(units::angular_velocity::turns_per_second_t Velocity)
Requests Motion Magic® to target a final velocity using a motion profile.
Definition MotionMagicVelocityDutyCycle.hpp:182
constexpr MotionMagicVelocityDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition MotionMagicVelocityDutyCycle.hpp:411
constexpr MotionMagicVelocityDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition MotionMagicVelocityDutyCycle.hpp:345
constexpr MotionMagicVelocityDutyCycle & WithFeedForward(units::dimensionless::scalar_t newFeedForward)
Modifies this Control Request's FeedForward parameter and returns itself for method-chaining and easi...
Definition MotionMagicVelocityDutyCycle.hpp:276
constexpr MotionMagicVelocityDutyCycle & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition MotionMagicVelocityDutyCycle.hpp:389
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14