10#include <units/frequency.h>
11#include <units/time.h>
12#include <units/angular_velocity.h>
13#include <units/angle.h>
26 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
162 constexpr std::string_view
GetName()
const override
164 return "DifferentialVelocityDutyCycle";
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Request PID to target velocity with a differential position setpoint.
Definition DifferentialVelocityDutyCycle.hpp:25
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition DifferentialVelocityDutyCycle.hpp:100
constexpr DifferentialVelocityDutyCycle & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition DifferentialVelocityDutyCycle.hpp:396
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition DifferentialVelocityDutyCycle.hpp:56
units::angle::turn_t DifferentialPosition
Differential position to drive toward in rotations.
Definition DifferentialVelocityDutyCycle.hpp:42
int DifferentialSlot
Select which gains are applied to the differential controller by selecting the slot.
Definition DifferentialVelocityDutyCycle.hpp:68
constexpr DifferentialVelocityDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition DifferentialVelocityDutyCycle.hpp:331
std::string ToString() const override
Returns a string representation of the object.
constexpr DifferentialVelocityDutyCycle(units::angular_velocity::turns_per_second_t AverageVelocity, units::angle::turn_t DifferentialPosition)
Request PID to target velocity with a differential position setpoint.
Definition DifferentialVelocityDutyCycle.hpp:150
constexpr DifferentialVelocityDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition DifferentialVelocityDutyCycle.hpp:374
constexpr DifferentialVelocityDutyCycle & WithAverageVelocity(units::angular_velocity::turns_per_second_t newAverageVelocity)
Modifies this Control Request's AverageVelocity parameter and returns itself for method-chaining and ...
Definition DifferentialVelocityDutyCycle.hpp:179
units::angular_velocity::turns_per_second_t AverageVelocity
Average velocity to drive toward in rotations per second.
Definition DifferentialVelocityDutyCycle.hpp:35
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition DifferentialVelocityDutyCycle.hpp:136
constexpr ~DifferentialVelocityDutyCycle() override
Definition DifferentialVelocityDutyCycle.hpp:155
constexpr DifferentialVelocityDutyCycle & WithDifferentialSlot(int newDifferentialSlot)
Modifies this Control Request's DifferentialSlot parameter and returns itself for method-chaining and...
Definition DifferentialVelocityDutyCycle.hpp:256
constexpr DifferentialVelocityDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition DifferentialVelocityDutyCycle.hpp:222
constexpr DifferentialVelocityDutyCycle & WithDifferentialPosition(units::angle::turn_t newDifferentialPosition)
Modifies this Control Request's DifferentialPosition parameter and returns itself for method-chaining...
Definition DifferentialVelocityDutyCycle.hpp:197
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition DifferentialVelocityDutyCycle.hpp:110
constexpr DifferentialVelocityDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition DifferentialVelocityDutyCycle.hpp:274
bool LimitForwardMotion
Set to true to force forward limiting.
Definition DifferentialVelocityDutyCycle.hpp:81
int AverageSlot
Select which gains are applied to the average controller by selecting the slot.
Definition DifferentialVelocityDutyCycle.hpp:62
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition DifferentialVelocityDutyCycle.hpp:87
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr DifferentialVelocityDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition DifferentialVelocityDutyCycle.hpp:308
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition DifferentialVelocityDutyCycle.hpp:121
constexpr DifferentialVelocityDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition DifferentialVelocityDutyCycle.hpp:291
constexpr DifferentialVelocityDutyCycle & WithAverageSlot(int newAverageSlot)
Modifies this Control Request's AverageSlot parameter and returns itself for method-chaining and easi...
Definition DifferentialVelocityDutyCycle.hpp:239
constexpr DifferentialVelocityDutyCycle & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition DifferentialVelocityDutyCycle.hpp:352
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition DifferentialVelocityDutyCycle.hpp:75
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition DifferentialVelocityDutyCycle.hpp:162
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14