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/current.hpp>
28 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
45 wpi::units::turns_per_second_squared_t
Acceleration = 0.0_tr_per_s_sq;
152 constexpr std::string_view
GetName()
const override
154 return "VelocityTorqueCurrentFOC";
228 Slot = std::move(newSlot);
constexpr ControlRequest(ControlRequest const &)=default
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition VelocityTorqueCurrentFOC.hpp:93
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr VelocityTorqueCurrentFOC & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition VelocityTorqueCurrentFOC.hpp:278
constexpr VelocityTorqueCurrentFOC & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition VelocityTorqueCurrentFOC.hpp:226
bool OverrideCoastDurNeutral
Set to true to coast the rotor when output is zero (or within deadband).
Definition VelocityTorqueCurrentFOC.hpp:68
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition VelocityTorqueCurrentFOC.hpp:152
constexpr VelocityTorqueCurrentFOC(wpi::units::turns_per_second_t Velocity)
Requires Phoenix Pro; Request PID to target velocity with torque current feedforward.
Definition VelocityTorqueCurrentFOC.hpp:141
constexpr VelocityTorqueCurrentFOC & WithOverrideCoastDurNeutral(bool newOverrideCoastDurNeutral)
Modifies this Control Request's OverrideCoastDurNeutral parameter and returns itself for method-chain...
Definition VelocityTorqueCurrentFOC.hpp:244
constexpr VelocityTorqueCurrentFOC & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition VelocityTorqueCurrentFOC.hpp:261
wpi::units::ampere_t FeedForward
Feedforward to apply in torque current in Amperes.
Definition VelocityTorqueCurrentFOC.hpp:55
constexpr VelocityTorqueCurrentFOC & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition VelocityTorqueCurrentFOC.hpp:344
constexpr VelocityTorqueCurrentFOC & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition VelocityTorqueCurrentFOC.hpp:301
constexpr VelocityTorqueCurrentFOC & WithFeedForward(wpi::units::ampere_t newFeedForward)
Modifies this Control Request's FeedForward parameter and returns itself for method-chaining and easi...
Definition VelocityTorqueCurrentFOC.hpp:209
constexpr ~VelocityTorqueCurrentFOC() override
Definition VelocityTorqueCurrentFOC.hpp:145
wpi::units::turns_per_second_t Velocity
Velocity to drive toward in rotations per second.
Definition VelocityTorqueCurrentFOC.hpp:37
constexpr VelocityTorqueCurrentFOC & 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 VelocityTorqueCurrentFOC.hpp:188
wpi::units::turns_per_second_squared_t Acceleration
Acceleration to drive toward in rotations per second squared.
Definition VelocityTorqueCurrentFOC.hpp:45
wpi::units::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition VelocityTorqueCurrentFOC.hpp:129
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition VelocityTorqueCurrentFOC.hpp:103
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition VelocityTorqueCurrentFOC.hpp:114
constexpr VelocityTorqueCurrentFOC & WithVelocity(wpi::units::turns_per_second_t newVelocity)
Modifies this Control Request's Velocity parameter and returns itself for method-chaining and easier ...
Definition VelocityTorqueCurrentFOC.hpp:169
int Slot
Select which gains are applied by selecting the slot.
Definition VelocityTorqueCurrentFOC.hpp:61
constexpr VelocityTorqueCurrentFOC & WithUpdateFreqHz(wpi::units::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition VelocityTorqueCurrentFOC.hpp:366
std::string ToString() const override
Returns a string representation of the object.
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition VelocityTorqueCurrentFOC.hpp:80
bool LimitForwardMotion
Set to true to force forward limiting.
Definition VelocityTorqueCurrentFOC.hpp:74
constexpr VelocityTorqueCurrentFOC & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition VelocityTorqueCurrentFOC.hpp:322
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