13#include <units/frequency.h>
14#include <units/time.h>
32 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override
34 if (req.get() !=
this)
37 if (reqCast !=
nullptr)
43 req = std::make_shared<DifferentialStrictFollower>(*
this);
126 std::stringstream ss;
127 ss <<
"Control: DifferentialStrictFollower" << std::endl;
128 ss <<
" MasterID: " <<
MasterID <<
" id" << std::endl;
139 std::map<std::string, std::string> controlInfo;
140 std::stringstream ss;
141 controlInfo[
"Name"] =
GetName();
142 ss <<
MasterID; controlInfo[
"MasterID"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_RequestControlDifferentialStrictFollower(const char *canbus, uint32_t ecuEncoding, double updateTime, 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 differential motor output of another Talon while ignoring the master's invert setting.
Definition DifferentialStrictFollower.hpp:31
std::string ToString() const override
Returns a string representation of the object.
Definition DifferentialStrictFollower.hpp:124
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition DifferentialStrictFollower.hpp:67
DifferentialStrictFollower & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition DifferentialStrictFollower.hpp:114
int MasterID
Device ID of the differential master to follow.
Definition DifferentialStrictFollower.hpp:54
DifferentialStrictFollower & WithMasterID(int newMasterID)
Modifies this Control Request's MasterID parameter and returns itself for method-chaining and easier ...
Definition DifferentialStrictFollower.hpp:95
DifferentialStrictFollower(int MasterID)
Follow the differential motor output of another Talon while ignoring the master's invert setting.
Definition DifferentialStrictFollower.hpp:82
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition DifferentialStrictFollower.hpp:137
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18