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