13#include <units/frequency.h>
14#include <units/time.h>
31 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override
33 if (req.get() !=
this)
36 if (reqCast !=
nullptr)
42 req = std::make_shared<StrictFollower>(*
this);
125 std::stringstream ss;
126 ss <<
"Control: StrictFollower" << std::endl;
127 ss <<
" MasterID: " <<
MasterID << std::endl;
138 std::map<std::string, std::string> controlInfo;
139 std::stringstream ss;
140 controlInfo[
"Name"] =
GetName();
141 ss <<
MasterID; controlInfo[
"MasterID"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_RequestControlStrictFollower(const char *canbus, uint32_t ecuEncoding, double updateFrequency, int MasterID)
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:30
std::string const & GetName() const
Definition ControlRequest.hpp:53
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition StrictFollower.hpp:30
StrictFollower(int MasterID)
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition StrictFollower.hpp:81
int MasterID
Device ID of the master to follow.
Definition StrictFollower.hpp:53
std::string ToString() const override
Returns a string representation of the object.
Definition StrictFollower.hpp:123
StrictFollower & WithMasterID(int newMasterID)
Modifies this Control Request's MasterID parameter and returns itself for method-chaining and easier ...
Definition StrictFollower.hpp:94
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition StrictFollower.hpp:136
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition StrictFollower.hpp:66
StrictFollower & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition StrictFollower.hpp:113
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition Diff_PositionDutyCycle_Position.hpp:15