14#include <units/frequency.h>
15#include <units/time.h>
27 bool ApplyConfigsOnRequest;
29 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash,
bool cancelOtherRequests, std::shared_ptr<ControlRequest> &req)
34 if (req.get() !=
this)
36 auto const reqCast =
dynamic_cast<StaticBrake *
>(req.get());
37 if (reqCast !=
nullptr)
43 req = std::make_shared<StaticBrake>(*
this);
48 std::string strs{ss.str()};
50 ApplyConfigsOnRequest =
false;
112 std::stringstream ss;
113 ss <<
"class: StaticBrake" << std::endl;
CTREXPORT int c_ctre_phoenixpro_requestConfigApply(const char *canbus, uint32_t ecuEncoding, double timeoutSeconds, const char *str, uint32_t strlen, bool forceApply)
CTREXPORT int c_ctre_phoenixpro_RequestControlStaticBrake(const char *canbus, uint32_t ecuEncoding, double updateTime, bool cancelOtherRequests)
Abstract Control Request class that other control requests extend for use.
Definition: ControlRequest.hpp:65
Applies full neutral-brake by shorting motor leads together.
Definition: StaticBrake.hpp:26
std::string ToString() const
Returns a string representation of the object.
Definition: StaticBrake.hpp:110
void ForceApplyConfigs()
Forces configs to be applied the next time this is used in a setControl.
Definition: StaticBrake.hpp:123
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition: StaticBrake.hpp:75
StaticBrake & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition: StaticBrake.hpp:100
units::time::second_t ConfigTimeout
The timeout when sending configs associated with this control.
Definition: StaticBrake.hpp:62
StaticBrake()
Applies full neutral-brake by shorting motor leads together.
Definition: StaticBrake.hpp:81
Definition: string_util.hpp:14