13#include <units/frequency.h>
14#include <units/time.h>
30 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override
32 if (req.get() !=
this)
35 if (reqCast !=
nullptr)
41 req = std::make_shared<DifferentialFollower>(*
this);
158 std::stringstream ss;
159 ss <<
"Control: DifferentialFollower" << std::endl;
160 ss <<
" MasterID: " <<
MasterID <<
" id" << std::endl;
172 std::map<std::string, std::string> controlInfo;
173 std::stringstream ss;
174 controlInfo[
"Name"] =
GetName();
175 ss <<
MasterID; controlInfo[
"MasterID"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_RequestControlDifferentialFollower(const char *canbus, uint32_t ecuEncoding, double updateTime, int MasterID, bool OpposeMasterDirection)
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.
Definition DifferentialFollower.hpp:29
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition DifferentialFollower.hpp:170
DifferentialFollower & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition DifferentialFollower.hpp:146
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition DifferentialFollower.hpp:73
DifferentialFollower & WithOpposeMasterDirection(bool newOpposeMasterDirection)
Modifies this Control Request's OpposeMasterDirection parameter and returns itself for method-chainin...
Definition DifferentialFollower.hpp:127
DifferentialFollower(int MasterID, bool OpposeMasterDirection)
Follow the differential motor output of another Talon.
Definition DifferentialFollower.hpp:94
DifferentialFollower & WithMasterID(int newMasterID)
Modifies this Control Request's MasterID parameter and returns itself for method-chaining and easier ...
Definition DifferentialFollower.hpp:108
int MasterID
Device ID of the differential master to follow.
Definition DifferentialFollower.hpp:52
std::string ToString() const override
Returns a string representation of the object.
Definition DifferentialFollower.hpp:156
bool OpposeMasterDirection
Set to false for motor invert to match the master's configured Invert.
Definition DifferentialFollower.hpp:60
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18