14#include <units/frequency.h>
15#include <units/time.h>
27 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash,
bool cancelOtherRequests, std::shared_ptr<ControlRequest> &req)
override
29 if (req.get() !=
this)
31 auto const reqCast =
dynamic_cast<StaticBrake *
>(req.get());
32 if (reqCast !=
nullptr)
38 req = std::make_shared<StaticBrake>(*
this);
95 ss <<
"class: StaticBrake" << std::endl;
107 std::map<std::string, std::string> controlInfo;
108 std::stringstream ss;
109 controlInfo[
"Name"] =
GetName();
CTREXPORT int c_ctre_phoenix6_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:28
std::string const & GetName() const
Definition: ControlRequest.hpp:51
Applies full neutral-brake by shorting motor leads together.
Definition: StaticBrake.hpp:26
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition: StaticBrake.hpp:105
std::string ToString() const override
Returns a string representation of the object.
Definition: StaticBrake.hpp:92
StaticBrake()
Applies full neutral-brake by shorting motor leads together.
Definition: StaticBrake.hpp:65
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition: StaticBrake.hpp:59
StaticBrake & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition: StaticBrake.hpp:82
Definition: string_util.hpp:15