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