14#include <units/frequency.h>
15#include <units/time.h>
33 bool ApplyConfigsOnRequest;
35 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash,
bool cancelOtherRequests, std::shared_ptr<ControlRequest> &req)
39 ss <<
MasterID; ref[
"MasterID"] = ss.str(); ss.str(std::string());
41 if (req.get() !=
this)
44 if (reqCast !=
nullptr)
50 req = std::make_shared<StrictFollower>(*
this);
55 std::string strs{ss.str()};
57 ApplyConfigsOnRequest =
false;
142 std::stringstream ss;
143 ss <<
"class: StrictFollower" << std::endl;
144 ss <<
"MasterID: " <<
MasterID << 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_RequestControlStrictFollower(const char *canbus, uint32_t ecuEncoding, double updateTime, bool cancelOtherRequests, int MasterID)
std::map< std::string, std::string > & GetNameValues()
Gets the map of control parameter names to the corresponding applied value.
Definition: ControlRequest.hpp:52
Abstract Control Request class that other control requests extend for use.
Definition: ControlRequest.hpp:65
ControlInfo requestReference
Definition: ControlRequest.hpp:70
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition: StrictFollower.hpp:32
void ForceApplyConfigs()
Forces configs to be applied the next time this is used in a setControl.
Definition: StrictFollower.hpp:153
StrictFollower & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition: StrictFollower.hpp:130
StrictFollower(int MasterID)
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition: StrictFollower.hpp:100
units::time::second_t ConfigTimeout
The timeout when sending configs associated with this control.
Definition: StrictFollower.hpp:72
StrictFollower & WithMasterID(int newMasterID)
Modifies this Control Request's MasterID parameter and returns itself for method-chaining and easier ...
Definition: StrictFollower.hpp:111
int MasterID
Device ID of the master to follow.
Definition: StrictFollower.hpp:65
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition: StrictFollower.hpp:85
std::string ToString() const
Returns a string representation of the object.
Definition: StrictFollower.hpp:140
Definition: string_util.hpp:14