10#include <units/frequency.h>
11#include <units/time.h>
12#include <units/angular_velocity.h>
13#include <units/angle.h>
36 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
184 constexpr std::string_view
GetName()
const override
186 return "DifferentialMotionMagicVelocityDutyCycle";
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential p...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:35
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:97
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:66
constexpr DifferentialMotionMagicVelocityDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:353
constexpr DifferentialMotionMagicVelocityDutyCycle & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:418
int DifferentialSlot
Select which gains are applied to the differential controller by selecting the slot.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:78
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:131
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:184
constexpr DifferentialMotionMagicVelocityDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:313
constexpr DifferentialMotionMagicVelocityDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:296
int AverageSlot
Select which gains are applied to the average controller by selecting the slot.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:72
constexpr DifferentialMotionMagicVelocityDutyCycle & WithDifferentialSlot(int newDifferentialSlot)
Modifies this Control Request's DifferentialSlot parameter and returns itself for method-chaining and...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:278
constexpr DifferentialMotionMagicVelocityDutyCycle & WithAverageVelocity(units::angular_velocity::turns_per_second_t newAverageVelocity)
Modifies this Control Request's AverageVelocity parameter and returns itself for method-chaining and ...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:201
constexpr DifferentialMotionMagicVelocityDutyCycle & WithAverageSlot(int newAverageSlot)
Modifies this Control Request's AverageSlot parameter and returns itself for method-chaining and easi...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:261
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:146
std::string ToString() const override
Returns a string representation of the object.
constexpr DifferentialMotionMagicVelocityDutyCycle(units::angular_velocity::turns_per_second_t AverageVelocity, units::angle::turn_t DifferentialPosition)
Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential p...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:172
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:120
units::angle::turn_t DifferentialPosition
Differential position to drive toward in rotations.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:52
constexpr DifferentialMotionMagicVelocityDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:244
constexpr DifferentialMotionMagicVelocityDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:396
constexpr DifferentialMotionMagicVelocityDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:330
units::angular_velocity::turns_per_second_t AverageVelocity
Average velocity to drive toward in rotations per second.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:45
constexpr DifferentialMotionMagicVelocityDutyCycle & WithDifferentialPosition(units::angle::turn_t newDifferentialPosition)
Modifies this Control Request's DifferentialPosition parameter and returns itself for method-chaining...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:219
constexpr ~DifferentialMotionMagicVelocityDutyCycle() override
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:177
constexpr DifferentialMotionMagicVelocityDutyCycle & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:374
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:110
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:85
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
bool LimitForwardMotion
Set to true to force forward limiting.
Definition DifferentialMotionMagicVelocityDutyCycle.hpp:91
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14