14#include <units/frequency.h>
15#include <units/time.h>
33 bool ApplyConfigsOnRequest{
false};
35 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash,
bool cancelOtherRequests, std::shared_ptr<ControlRequest> &req)
override
37 if (req.get() !=
this)
40 if (reqCast !=
nullptr)
46 req = std::make_shared<DifferentialStrictFollower>(*
this);
52 std::string strs{ss.str()};
54 ApplyConfigsOnRequest =
false;
138 std::stringstream ss;
139 ss <<
"class: DifferentialStrictFollower" << std::endl;
140 ss <<
"MasterID: " <<
MasterID << std::endl;
158 std::map<std::string, std::string> controlInfo;
159 std::stringstream ss;
160 controlInfo[
"Name"] =
GetName();
161 ss <<
MasterID; controlInfo[
"MasterID"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_requestConfigApply(const char *canbus, uint32_t ecuEncoding, double timeoutSeconds, const char *str, uint32_t strlen, bool forceApply)
CTREXPORT int c_ctre_phoenix6_RequestControlDifferentialStrictFollower(const char *canbus, uint32_t ecuEncoding, double updateTime, bool cancelOtherRequests, int MasterID)
Abstract Control Request class that other control requests extend for use.
Definition: ControlRequest.hpp:28
std::string const & GetName() const
Definition: ControlRequest.hpp:51
Follow the differential motor output of another Talon while ignoring the master's invert setting.
Definition: DifferentialStrictFollower.hpp:32
std::string ToString() const override
Returns a string representation of the object.
Definition: DifferentialStrictFollower.hpp:136
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition: DifferentialStrictFollower.hpp:82
DifferentialStrictFollower & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition: DifferentialStrictFollower.hpp:126
int MasterID
Device ID of the differential master to follow.
Definition: DifferentialStrictFollower.hpp:62
DifferentialStrictFollower & WithMasterID(int newMasterID)
Modifies this Control Request's MasterID parameter and returns itself for method-chaining and easier ...
Definition: DifferentialStrictFollower.hpp:107
units::time::second_t ConfigTimeout
The timeout when sending configs associated with this control.
Definition: DifferentialStrictFollower.hpp:69
DifferentialStrictFollower(int MasterID)
Follow the differential motor output of another Talon while ignoring the master's invert setting.
Definition: DifferentialStrictFollower.hpp:97
void ForceApplyConfigs()
Forces configs to be applied the next time this is used in a setControl.
Definition: DifferentialStrictFollower.hpp:149
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition: DifferentialStrictFollower.hpp:156
Definition: ManualEvent.hpp:12