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/voltage.hpp>
27 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
44 wpi::units::turns_per_second_t
Velocity = 0.0_tps;
162 constexpr std::string_view
GetName()
const override
164 return "PositionVoltage";
261 Slot = std::move(newSlot);
constexpr ControlRequest(ControlRequest const &)=default
constexpr ~PositionVoltage() override
Definition PositionVoltage.hpp:155
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition PositionVoltage.hpp:125
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition PositionVoltage.hpp:58
constexpr PositionVoltage(wpi::units::turn_t Position)
Request PID to target position with voltage feedforward.
Definition PositionVoltage.hpp:151
constexpr PositionVoltage & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition PositionVoltage.hpp:334
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition PositionVoltage.hpp:91
constexpr PositionVoltage & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition PositionVoltage.hpp:259
constexpr PositionVoltage & WithUpdateFreqHz(wpi::units::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition PositionVoltage.hpp:399
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition PositionVoltage.hpp:114
constexpr PositionVoltage & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition PositionVoltage.hpp:277
std::string ToString() const override
Returns a string representation of the object.
constexpr PositionVoltage & WithVelocity(wpi::units::turns_per_second_t newVelocity)
Modifies this Control Request's Velocity parameter and returns itself for method-chaining and easier ...
Definition PositionVoltage.hpp:198
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
wpi::units::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition PositionVoltage.hpp:140
constexpr PositionVoltage & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition PositionVoltage.hpp:355
constexpr PositionVoltage & WithFeedForward(wpi::units::volt_t newFeedForward)
Modifies this Control Request's FeedForward parameter and returns itself for method-chaining and easi...
Definition PositionVoltage.hpp:242
int Slot
Select which gains are applied by selecting the slot.
Definition PositionVoltage.hpp:72
constexpr PositionVoltage & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition PositionVoltage.hpp:294
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition PositionVoltage.hpp:104
constexpr PositionVoltage & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition PositionVoltage.hpp:311
wpi::units::turn_t Position
Position to drive toward in rotations.
Definition PositionVoltage.hpp:36
wpi::units::volt_t FeedForward
Feedforward to apply in volts.
Definition PositionVoltage.hpp:66
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition PositionVoltage.hpp:162
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition PositionVoltage.hpp:79
constexpr PositionVoltage & WithPosition(wpi::units::turn_t newPosition)
Modifies this Control Request's Position parameter and returns itself for method-chaining and easier ...
Definition PositionVoltage.hpp:179
wpi::units::turns_per_second_t Velocity
Velocity to drive toward in rotations per second.
Definition PositionVoltage.hpp:44
constexpr PositionVoltage & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition PositionVoltage.hpp:377
constexpr PositionVoltage & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition PositionVoltage.hpp:223
bool LimitForwardMotion
Set to true to force forward limiting.
Definition PositionVoltage.hpp:85
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