10#include <units/frequency.h>
11#include <units/time.h>
12#include <units/dimensionless.h>
24 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
34 units::dimensionless::scalar_t
Output;
138 constexpr std::string_view
GetName()
const override
140 return "DutyCycleOut";
157 Output = std::move(newOutput);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Request a specified motor duty cycle.
Definition DutyCycleOut.hpp:23
constexpr DutyCycleOut & WithOutput(units::dimensionless::scalar_t newOutput)
Modifies this Control Request's Output parameter and returns itself for method-chaining and easier to...
Definition DutyCycleOut.hpp:155
constexpr DutyCycleOut & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition DutyCycleOut.hpp:320
constexpr DutyCycleOut & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition DutyCycleOut.hpp:180
bool LimitForwardMotion
Set to true to force forward limiting.
Definition DutyCycleOut.hpp:61
constexpr DutyCycleOut & WithIgnoreSoftwareLimits(bool newIgnoreSoftwareLimits)
Modifies this Control Request's IgnoreSoftwareLimits parameter and returns itself for method-chaining...
Definition DutyCycleOut.hpp:276
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition DutyCycleOut.hpp:138
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition DutyCycleOut.hpp:55
units::dimensionless::scalar_t Output
Proportion of supply voltage to apply in fractional units between -1 and +1.
Definition DutyCycleOut.hpp:34
constexpr DutyCycleOut & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition DutyCycleOut.hpp:255
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition DutyCycleOut.hpp:116
constexpr DutyCycleOut & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition DutyCycleOut.hpp:215
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition DutyCycleOut.hpp:101
bool IgnoreSoftwareLimits
Set to true to ignore software limits, instead allowing motion.
Definition DutyCycleOut.hpp:90
constexpr DutyCycleOut(units::dimensionless::scalar_t Output)
Request a specified motor duty cycle.
Definition DutyCycleOut.hpp:127
std::string ToString() const override
Returns a string representation of the object.
constexpr ~DutyCycleOut() override
Definition DutyCycleOut.hpp:131
constexpr DutyCycleOut & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition DutyCycleOut.hpp:232
constexpr DutyCycleOut & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition DutyCycleOut.hpp:198
constexpr DutyCycleOut & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition DutyCycleOut.hpp:298
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition DutyCycleOut.hpp:80
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition DutyCycleOut.hpp:48
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition DutyCycleOut.hpp:67
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14