10#include <units/frequency.h>
11#include <units/time.h>
12#include <units/angle.h>
31 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
174 constexpr std::string_view
GetName()
const override
176 return "DifferentialMotionMagicDutyCycle";
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Requests Motion Magic® to target a final position using a motion profile, and PID to a differential p...
Definition DifferentialMotionMagicDutyCycle.hpp:30
units::angle::turn_t AveragePosition
Average position to drive toward in rotations.
Definition DifferentialMotionMagicDutyCycle.hpp:40
constexpr DifferentialMotionMagicDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition DifferentialMotionMagicDutyCycle.hpp:286
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition DifferentialMotionMagicDutyCycle.hpp:92
constexpr DifferentialMotionMagicDutyCycle & WithDifferentialSlot(int newDifferentialSlot)
Modifies this Control Request's DifferentialSlot parameter and returns itself for method-chaining and...
Definition DifferentialMotionMagicDutyCycle.hpp:268
int AverageSlot
Select which gains are applied to the average controller by selecting the slot.
Definition DifferentialMotionMagicDutyCycle.hpp:67
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition DifferentialMotionMagicDutyCycle.hpp:80
int DifferentialSlot
Select which gains are applied to the differential controller by selecting the slot.
Definition DifferentialMotionMagicDutyCycle.hpp:73
constexpr DifferentialMotionMagicDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition DifferentialMotionMagicDutyCycle.hpp:320
constexpr DifferentialMotionMagicDutyCycle & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition DifferentialMotionMagicDutyCycle.hpp:408
constexpr DifferentialMotionMagicDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition DifferentialMotionMagicDutyCycle.hpp:234
constexpr DifferentialMotionMagicDutyCycle & WithAverageSlot(int newAverageSlot)
Modifies this Control Request's AverageSlot parameter and returns itself for method-chaining and easi...
Definition DifferentialMotionMagicDutyCycle.hpp:251
constexpr DifferentialMotionMagicDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition DifferentialMotionMagicDutyCycle.hpp:303
constexpr DifferentialMotionMagicDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition DifferentialMotionMagicDutyCycle.hpp:343
constexpr DifferentialMotionMagicDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition DifferentialMotionMagicDutyCycle.hpp:386
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition DifferentialMotionMagicDutyCycle.hpp:126
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition DifferentialMotionMagicDutyCycle.hpp:174
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition DifferentialMotionMagicDutyCycle.hpp:105
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition DifferentialMotionMagicDutyCycle.hpp:115
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition DifferentialMotionMagicDutyCycle.hpp:61
constexpr DifferentialMotionMagicDutyCycle & WithDifferentialPosition(units::angle::turn_t newDifferentialPosition)
Modifies this Control Request's DifferentialPosition parameter and returns itself for method-chaining...
Definition DifferentialMotionMagicDutyCycle.hpp:209
std::string ToString() const override
Returns a string representation of the object.
bool LimitForwardMotion
Set to true to force forward limiting.
Definition DifferentialMotionMagicDutyCycle.hpp:86
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr DifferentialMotionMagicDutyCycle & WithAveragePosition(units::angle::turn_t newAveragePosition)
Modifies this Control Request's AveragePosition parameter and returns itself for method-chaining and ...
Definition DifferentialMotionMagicDutyCycle.hpp:191
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition DifferentialMotionMagicDutyCycle.hpp:141
units::angle::turn_t DifferentialPosition
Differential position to drive toward in rotations.
Definition DifferentialMotionMagicDutyCycle.hpp:47
constexpr DifferentialMotionMagicDutyCycle & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition DifferentialMotionMagicDutyCycle.hpp:364
constexpr DifferentialMotionMagicDutyCycle(units::angle::turn_t AveragePosition, units::angle::turn_t DifferentialPosition)
Requests Motion Magic® to target a final position using a motion profile, and PID to a differential p...
Definition DifferentialMotionMagicDutyCycle.hpp:162
constexpr ~DifferentialMotionMagicDutyCycle() override
Definition DifferentialMotionMagicDutyCycle.hpp:167
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14