10#include <wpi/units/frequency.hpp>
11#include <wpi/units/time.hpp>
12#include <wpi/units/current.hpp>
13#include <wpi/units/dimensionless.hpp>
28 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
154 constexpr std::string_view
GetName()
const override
156 return "TorqueCurrentFOC";
173 Output = std::move(newOutput);
constexpr ControlRequest(ControlRequest const &)=default
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition TorqueCurrentFOC.hpp:154
constexpr TorqueCurrentFOC & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition TorqueCurrentFOC.hpp:292
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr ~TorqueCurrentFOC() override
Definition TorqueCurrentFOC.hpp:147
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition TorqueCurrentFOC.hpp:94
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition TorqueCurrentFOC.hpp:115
constexpr TorqueCurrentFOC & WithDeadband(wpi::units::ampere_t newDeadband)
Modifies this Control Request's Deadband parameter and returns itself for method-chaining and easier ...
Definition TorqueCurrentFOC.hpp:217
constexpr TorqueCurrentFOC(wpi::units::ampere_t Output)
Requires Phoenix Pro; Request a specified motor current (field oriented control).
Definition TorqueCurrentFOC.hpp:143
constexpr TorqueCurrentFOC & WithOverrideCoastDurNeutral(bool newOverrideCoastDurNeutral)
Modifies this Control Request's OverrideCoastDurNeutral parameter and returns itself for method-chain...
Definition TorqueCurrentFOC.hpp:235
bool OverrideCoastDurNeutral
Set to true to coast the rotor when output is zero (or within deadband).
Definition TorqueCurrentFOC.hpp:69
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition TorqueCurrentFOC.hpp:81
constexpr TorqueCurrentFOC & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition TorqueCurrentFOC.hpp:269
wpi::units::ampere_t Output
Amount of motor current in Amperes.
Definition TorqueCurrentFOC.hpp:37
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition TorqueCurrentFOC.hpp:104
bool LimitForwardMotion
Set to true to force forward limiting.
Definition TorqueCurrentFOC.hpp:75
constexpr TorqueCurrentFOC & WithOutput(wpi::units::ampere_t newOutput)
Modifies this Control Request's Output parameter and returns itself for method-chaining and easier to...
Definition TorqueCurrentFOC.hpp:171
constexpr TorqueCurrentFOC & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition TorqueCurrentFOC.hpp:252
wpi::units::scalar_t MaxAbsDutyCycle
The maximum absolute motor output that can be applied, which effectively limits the velocity.
Definition TorqueCurrentFOC.hpp:49
constexpr TorqueCurrentFOC & WithMaxAbsDutyCycle(wpi::units::scalar_t newMaxAbsDutyCycle)
Modifies this Control Request's MaxAbsDutyCycle parameter and returns itself for method-chaining and ...
Definition TorqueCurrentFOC.hpp:194
wpi::units::ampere_t Deadband
Deadband in Amperes.
Definition TorqueCurrentFOC.hpp:62
constexpr TorqueCurrentFOC & WithUpdateFreqHz(wpi::units::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition TorqueCurrentFOC.hpp:357
constexpr TorqueCurrentFOC & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition TorqueCurrentFOC.hpp:335
std::string ToString() const override
Returns a string representation of the object.
constexpr TorqueCurrentFOC & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition TorqueCurrentFOC.hpp:313
wpi::units::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition TorqueCurrentFOC.hpp:130
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