CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
DynamicMotionMagicDutyCycle.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
12#include <sstream>
13#include <units/angle.h>
14#include <units/angular_velocity.h>
15#include <units/angular_acceleration.h>
16#include <units/angular_jerk.h>
17#include <units/dimensionless.h>
18#include <units/frequency.h>
19#include <units/time.h>
20
21
22namespace ctre {
23namespace phoenix6 {
24namespace controls {
25
26/**
27 * Requires Phoenix Pro and CANivore;
28 * Requests Motion Magic® to target a final position using a motion profile.
29 * This dynamic request allows runtime changes to Cruise Velocity, Acceleration,
30 * and Jerk. Users can optionally provide a duty cycle feedforward. This
31 * control requires use of a CANivore.
32 *
33 * Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise
34 * Velocity, Acceleration, and (optional) Jerk. This control mode does not use the Expo_kV or Expo_kA
35 * configs.
36 *
37 * Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This
38 * control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the
39 * numerator: +1.0 represents full forward output.
40 */
42{
43 ctre::phoenix::StatusCode SendRequest(const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req) const override
44 {
45 if (req.get() != this)
46 {
47 auto const reqCast = dynamic_cast<DynamicMotionMagicDutyCycle *>(req.get());
48 if (reqCast != nullptr)
49 {
50 *reqCast = *this;
51 }
52 else
53 {
54 req = std::make_shared<DynamicMotionMagicDutyCycle>(*this);
55 }
56 }
57
59 }
60
61public:
62 /**
63 * \brief Position to drive toward in rotations.
64 */
65 units::angle::turn_t Position;
66 /**
67 * \brief Cruise velocity for profiling. The signage does not matter as the
68 * device will use the absolute value for profile generation.
69 */
70 units::angular_velocity::turns_per_second_t Velocity;
71 /**
72 * \brief Acceleration for profiling. The signage does not matter as the device
73 * will use the absolute value for profile generation
74 */
75 units::angular_acceleration::turns_per_second_squared_t Acceleration;
76 /**
77 * \brief Jerk for profiling. The signage does not matter as the device will
78 * use the absolute value for profile generation.
79 *
80 * Jerk is optional; if this is set to zero, then Motion Magic® will not apply a
81 * Jerk limit.
82 */
83 units::angular_jerk::turns_per_second_cubed_t Jerk;
84 /**
85 * \brief Set to true to use FOC commutation (requires Phoenix Pro), which
86 * increases peak power by ~15%. Set to false to use trapezoidal commutation.
87 *
88 * FOC improves motor performance by leveraging torque (current) control.
89 * However, this may be inconvenient for applications that require specifying
90 * duty cycle or voltage. CTR-Electronics has developed a hybrid method that
91 * combines the performances gains of FOC while still allowing applications to
92 * provide duty cycle or voltage demand. This not to be confused with simple
93 * sinusoidal control or phase voltage control which lacks the performance
94 * gains.
95 */
96 bool EnableFOC = true;
97 /**
98 * \brief Feedforward to apply in fractional units between -1 and +1.
99 */
100 units::dimensionless::scalar_t FeedForward = 0.0;
101 /**
102 * \brief Select which gains are applied by selecting the slot. Use the
103 * configuration api to set the gain values for the selected slot before
104 * enabling this feature. Slot must be within [0,2].
105 */
106 int Slot = 0;
107 /**
108 * \brief Set to true to static-brake the rotor when output is zero (or within
109 * deadband). Set to false to use the NeutralMode configuration setting
110 * (default). This flag exists to provide the fundamental behavior of this
111 * control when output is zero, which is to provide 0V to the motor.
112 */
114 /**
115 * \brief Set to true to force forward limiting. This allows users to use other
116 * limit switch sensors connected to robot controller. This also allows use of
117 * active sensors that require external power.
118 */
119 bool LimitForwardMotion = false;
120 /**
121 * \brief Set to true to force reverse limiting. This allows users to use other
122 * limit switch sensors connected to robot controller. This also allows use of
123 * active sensors that require external power.
124 */
125 bool LimitReverseMotion = false;
126 /**
127 * \brief Set to true to ignore hardware limit switches and the
128 * LimitForwardMotion and LimitReverseMotion parameters, instead allowing
129 * motion.
130 *
131 * This can be useful on mechanisms such as an intake/feeder, where a limit
132 * switch stops motion while intaking but should be ignored when feeding to a
133 * shooter.
134 *
135 * The hardware limit faults and Forward/ReverseLimit signals will still report
136 * the values of the limit switches regardless of this parameter.
137 */
139 /**
140 * \brief Set to true to delay applying this control request until a timesync
141 * boundary (requires Phoenix Pro and CANivore). This eliminates the impact of
142 * nondeterministic network delays in exchange for a larger but deterministic
143 * control latency.
144 *
145 * This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs.
146 * Additionally, when this is enabled, the UpdateFreqHz of this request should
147 * be set to 0 Hz.
148 */
149 bool UseTimesync = false;
150
151 /**
152 * \brief The period at which this control will update at.
153 * This is designated in Hertz, with a minimum of 20 Hz
154 * (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
155 *
156 * If this field is set to 0 Hz, the control request will
157 * be sent immediately as a one-shot frame. This may be useful
158 * for advanced applications that require outputs to be
159 * synchronized with data acquisition. In this case, we
160 * recommend not exceeding 50 ms between control calls.
161 */
162 units::frequency::hertz_t UpdateFreqHz{100_Hz};
163
164 /**
165 * \brief Requires Phoenix Pro and CANivore;
166 * Requests Motion Magic® to target a final position using a motion
167 * profile. This dynamic request allows runtime changes to Cruise
168 * Velocity, Acceleration, and Jerk. Users can optionally provide a duty
169 * cycle feedforward. This control requires use of a CANivore.
170 *
171 * \details Motion Magic® produces a motion profile in real-time while
172 * attempting to honor the specified Cruise Velocity, Acceleration, and
173 * (optional) Jerk. This control mode does not use the Expo_kV or
174 * Expo_kA configs.
175 *
176 * Target position can be changed on-the-fly and Motion Magic® will do
177 * its best to adjust the profile. This control mode is duty cycle
178 * based, so relevant closed-loop gains will use fractional duty cycle
179 * for the numerator: +1.0 represents full forward output.
180 *
181 * \param Position Position to drive toward in rotations.
182 * \param Velocity Cruise velocity for profiling. The signage does not
183 * matter as the device will use the absolute value for
184 * profile generation.
185 * \param Acceleration Acceleration for profiling. The signage does not
186 * matter as the device will use the absolute value for
187 * profile generation
188 * \param Jerk Jerk for profiling. The signage does not matter as the device
189 * will use the absolute value for profile generation.
190 *
191 * Jerk is optional; if this is set to zero, then Motion Magic®
192 * will not apply a Jerk limit.
193 */
194 DynamicMotionMagicDutyCycle(units::angle::turn_t Position, units::angular_velocity::turns_per_second_t Velocity, units::angular_acceleration::turns_per_second_squared_t Acceleration, units::angular_jerk::turns_per_second_cubed_t Jerk) : ControlRequest{"DynamicMotionMagicDutyCycle"},
195 Position{std::move(Position)},
196 Velocity{std::move(Velocity)},
198 Jerk{std::move(Jerk)}
199 {}
200
201 /**
202 * \brief Modifies this Control Request's Position parameter and returns itself for
203 * method-chaining and easier to use request API.
204 *
205 * Position to drive toward in rotations.
206 *
207 * \param newPosition Parameter to modify
208 * \returns Itself
209 */
210 DynamicMotionMagicDutyCycle &WithPosition(units::angle::turn_t newPosition)
211 {
212 Position = std::move(newPosition);
213 return *this;
214 }
215
216 /**
217 * \brief Modifies this Control Request's Velocity parameter and returns itself for
218 * method-chaining and easier to use request API.
219 *
220 * Cruise velocity for profiling. The signage does not matter as the device
221 * will use the absolute value for profile generation.
222 *
223 * \param newVelocity Parameter to modify
224 * \returns Itself
225 */
226 DynamicMotionMagicDutyCycle &WithVelocity(units::angular_velocity::turns_per_second_t newVelocity)
227 {
228 Velocity = std::move(newVelocity);
229 return *this;
230 }
231
232 /**
233 * \brief Modifies this Control Request's Acceleration parameter and returns itself for
234 * method-chaining and easier to use request API.
235 *
236 * Acceleration for profiling. The signage does not matter as the device will
237 * use the absolute value for profile generation
238 *
239 * \param newAcceleration Parameter to modify
240 * \returns Itself
241 */
242 DynamicMotionMagicDutyCycle &WithAcceleration(units::angular_acceleration::turns_per_second_squared_t newAcceleration)
243 {
244 Acceleration = std::move(newAcceleration);
245 return *this;
246 }
247
248 /**
249 * \brief Modifies this Control Request's Jerk parameter and returns itself for
250 * method-chaining and easier to use request API.
251 *
252 * Jerk for profiling. The signage does not matter as the device will use the
253 * absolute value for profile generation.
254 *
255 * Jerk is optional; if this is set to zero, then Motion Magic® will not apply a
256 * Jerk limit.
257 *
258 * \param newJerk Parameter to modify
259 * \returns Itself
260 */
261 DynamicMotionMagicDutyCycle &WithJerk(units::angular_jerk::turns_per_second_cubed_t newJerk)
262 {
263 Jerk = std::move(newJerk);
264 return *this;
265 }
266
267 /**
268 * \brief Modifies this Control Request's EnableFOC parameter and returns itself for
269 * method-chaining and easier to use request API.
270 *
271 * Set to true to use FOC commutation (requires Phoenix Pro), which increases
272 * peak power by ~15%. Set to false to use trapezoidal commutation.
273 *
274 * FOC improves motor performance by leveraging torque (current) control.
275 * However, this may be inconvenient for applications that require specifying
276 * duty cycle or voltage. CTR-Electronics has developed a hybrid method that
277 * combines the performances gains of FOC while still allowing applications to
278 * provide duty cycle or voltage demand. This not to be confused with simple
279 * sinusoidal control or phase voltage control which lacks the performance
280 * gains.
281 *
282 * \param newEnableFOC Parameter to modify
283 * \returns Itself
284 */
286 {
287 EnableFOC = std::move(newEnableFOC);
288 return *this;
289 }
290
291 /**
292 * \brief Modifies this Control Request's FeedForward parameter and returns itself for
293 * method-chaining and easier to use request API.
294 *
295 * Feedforward to apply in fractional units between -1 and +1.
296 *
297 * \param newFeedForward Parameter to modify
298 * \returns Itself
299 */
300 DynamicMotionMagicDutyCycle &WithFeedForward(units::dimensionless::scalar_t newFeedForward)
301 {
302 FeedForward = std::move(newFeedForward);
303 return *this;
304 }
305
306 /**
307 * \brief Modifies this Control Request's Slot parameter and returns itself for
308 * method-chaining and easier to use request API.
309 *
310 * Select which gains are applied by selecting the slot. Use the configuration
311 * api to set the gain values for the selected slot before enabling this
312 * feature. Slot must be within [0,2].
313 *
314 * \param newSlot Parameter to modify
315 * \returns Itself
316 */
318 {
319 Slot = std::move(newSlot);
320 return *this;
321 }
322
323 /**
324 * \brief Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for
325 * method-chaining and easier to use request API.
326 *
327 * Set to true to static-brake the rotor when output is zero (or within
328 * deadband). Set to false to use the NeutralMode configuration setting
329 * (default). This flag exists to provide the fundamental behavior of this
330 * control when output is zero, which is to provide 0V to the motor.
331 *
332 * \param newOverrideBrakeDurNeutral Parameter to modify
333 * \returns Itself
334 */
336 {
337 OverrideBrakeDurNeutral = std::move(newOverrideBrakeDurNeutral);
338 return *this;
339 }
340
341 /**
342 * \brief Modifies this Control Request's LimitForwardMotion parameter and returns itself for
343 * method-chaining and easier to use request API.
344 *
345 * Set to true to force forward limiting. This allows users to use other limit
346 * switch sensors connected to robot controller. This also allows use of active
347 * sensors that require external power.
348 *
349 * \param newLimitForwardMotion Parameter to modify
350 * \returns Itself
351 */
353 {
354 LimitForwardMotion = std::move(newLimitForwardMotion);
355 return *this;
356 }
357
358 /**
359 * \brief Modifies this Control Request's LimitReverseMotion parameter and returns itself for
360 * method-chaining and easier to use request API.
361 *
362 * Set to true to force reverse limiting. This allows users to use other limit
363 * switch sensors connected to robot controller. This also allows use of active
364 * sensors that require external power.
365 *
366 * \param newLimitReverseMotion Parameter to modify
367 * \returns Itself
368 */
370 {
371 LimitReverseMotion = std::move(newLimitReverseMotion);
372 return *this;
373 }
374
375 /**
376 * \brief Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for
377 * method-chaining and easier to use request API.
378 *
379 * Set to true to ignore hardware limit switches and the LimitForwardMotion and
380 * LimitReverseMotion parameters, instead allowing motion.
381 *
382 * This can be useful on mechanisms such as an intake/feeder, where a limit
383 * switch stops motion while intaking but should be ignored when feeding to a
384 * shooter.
385 *
386 * The hardware limit faults and Forward/ReverseLimit signals will still report
387 * the values of the limit switches regardless of this parameter.
388 *
389 * \param newIgnoreHardwareLimits Parameter to modify
390 * \returns Itself
391 */
393 {
394 IgnoreHardwareLimits = std::move(newIgnoreHardwareLimits);
395 return *this;
396 }
397
398 /**
399 * \brief Modifies this Control Request's UseTimesync parameter and returns itself for
400 * method-chaining and easier to use request API.
401 *
402 * Set to true to delay applying this control request until a timesync boundary
403 * (requires Phoenix Pro and CANivore). This eliminates the impact of
404 * nondeterministic network delays in exchange for a larger but deterministic
405 * control latency.
406 *
407 * This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs.
408 * Additionally, when this is enabled, the UpdateFreqHz of this request should
409 * be set to 0 Hz.
410 *
411 * \param newUseTimesync Parameter to modify
412 * \returns Itself
413 */
415 {
416 UseTimesync = std::move(newUseTimesync);
417 return *this;
418 }
419 /**
420 * \brief Sets the period at which this control will update at.
421 * This is designated in Hertz, with a minimum of 20 Hz
422 * (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
423 *
424 * If this field is set to 0 Hz, the control request will
425 * be sent immediately as a one-shot frame. This may be useful
426 * for advanced applications that require outputs to be
427 * synchronized with data acquisition. In this case, we
428 * recommend not exceeding 50 ms between control calls.
429 *
430 * \param newUpdateFreqHz Parameter to modify
431 * \returns Itself
432 */
433 DynamicMotionMagicDutyCycle &WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
434 {
435 UpdateFreqHz = newUpdateFreqHz;
436 return *this;
437 }
438 /**
439 * \brief Returns a string representation of the object.
440 *
441 * \returns a string representation of the object.
442 */
443 std::string ToString() const override
444 {
445 std::stringstream ss;
446 ss << "Control: DynamicMotionMagicDutyCycle" << std::endl;
447 ss << " Position: " << Position.to<double>() << " rotations" << std::endl;
448 ss << " Velocity: " << Velocity.to<double>() << " rotations per second" << std::endl;
449 ss << " Acceleration: " << Acceleration.to<double>() << " rotations per second²" << std::endl;
450 ss << " Jerk: " << Jerk.to<double>() << " rotations per second³" << std::endl;
451 ss << " EnableFOC: " << EnableFOC << std::endl;
452 ss << " FeedForward: " << FeedForward.to<double>() << " fractional" << std::endl;
453 ss << " Slot: " << Slot << std::endl;
454 ss << " OverrideBrakeDurNeutral: " << OverrideBrakeDurNeutral << std::endl;
455 ss << " LimitForwardMotion: " << LimitForwardMotion << std::endl;
456 ss << " LimitReverseMotion: " << LimitReverseMotion << std::endl;
457 ss << " IgnoreHardwareLimits: " << IgnoreHardwareLimits << std::endl;
458 ss << " UseTimesync: " << UseTimesync << std::endl;
459 return ss.str();
460 }
461
462 /**
463 * \brief Gets information about this control request.
464 *
465 * \returns Map of control parameter names and corresponding applied values
466 */
467 std::map<std::string, std::string> GetControlInfo() const override
468 {
469 std::map<std::string, std::string> controlInfo;
470 std::stringstream ss;
471 controlInfo["Name"] = GetName();
472 ss << Position.to<double>(); controlInfo["Position"] = ss.str(); ss.str(std::string{});
473 ss << Velocity.to<double>(); controlInfo["Velocity"] = ss.str(); ss.str(std::string{});
474 ss << Acceleration.to<double>(); controlInfo["Acceleration"] = ss.str(); ss.str(std::string{});
475 ss << Jerk.to<double>(); controlInfo["Jerk"] = ss.str(); ss.str(std::string{});
476 ss << EnableFOC; controlInfo["EnableFOC"] = ss.str(); ss.str(std::string{});
477 ss << FeedForward.to<double>(); controlInfo["FeedForward"] = ss.str(); ss.str(std::string{});
478 ss << Slot; controlInfo["Slot"] = ss.str(); ss.str(std::string{});
479 ss << OverrideBrakeDurNeutral; controlInfo["OverrideBrakeDurNeutral"] = ss.str(); ss.str(std::string{});
480 ss << LimitForwardMotion; controlInfo["LimitForwardMotion"] = ss.str(); ss.str(std::string{});
481 ss << LimitReverseMotion; controlInfo["LimitReverseMotion"] = ss.str(); ss.str(std::string{});
482 ss << IgnoreHardwareLimits; controlInfo["IgnoreHardwareLimits"] = ss.str(); ss.str(std::string{});
483 ss << UseTimesync; controlInfo["UseTimesync"] = ss.str(); ss.str(std::string{});
484 return controlInfo;
485 }
486};
487
488}
489}
490}
491
CTREXPORT int c_ctre_phoenix6_RequestControlDynamicMotionMagicDutyCycle(const char *canbus, uint32_t ecuEncoding, double updateTime, double Position, double Velocity, double Acceleration, double Jerk, bool EnableFOC, double FeedForward, int Slot, bool OverrideBrakeDurNeutral, bool LimitForwardMotion, bool LimitReverseMotion, bool IgnoreHardwareLimits, bool UseTimesync)
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:29
std::string const & GetName() const
Definition ControlRequest.hpp:52
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicDutyCycle.hpp:42
std::string ToString() const override
Returns a string representation of the object.
Definition DynamicMotionMagicDutyCycle.hpp:443
DynamicMotionMagicDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition DynamicMotionMagicDutyCycle.hpp:414
units::angular_velocity::turns_per_second_t Velocity
Cruise velocity for profiling.
Definition DynamicMotionMagicDutyCycle.hpp:70
units::angular_acceleration::turns_per_second_squared_t Acceleration
Acceleration for profiling.
Definition DynamicMotionMagicDutyCycle.hpp:75
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition DynamicMotionMagicDutyCycle.hpp:113
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition DynamicMotionMagicDutyCycle.hpp:162
DynamicMotionMagicDutyCycle(units::angle::turn_t Position, units::angular_velocity::turns_per_second_t Velocity, units::angular_acceleration::turns_per_second_squared_t Acceleration, units::angular_jerk::turns_per_second_cubed_t Jerk)
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicDutyCycle.hpp:194
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%.
Definition DynamicMotionMagicDutyCycle.hpp:96
DynamicMotionMagicDutyCycle & WithVelocity(units::angular_velocity::turns_per_second_t newVelocity)
Modifies this Control Request's Velocity parameter and returns itself for method-chaining and easier ...
Definition DynamicMotionMagicDutyCycle.hpp:226
units::angular_jerk::turns_per_second_cubed_t Jerk
Jerk for profiling.
Definition DynamicMotionMagicDutyCycle.hpp:83
DynamicMotionMagicDutyCycle & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition DynamicMotionMagicDutyCycle.hpp:317
DynamicMotionMagicDutyCycle & WithAcceleration(units::angular_acceleration::turns_per_second_squared_t newAcceleration)
Modifies this Control Request's Acceleration parameter and returns itself for method-chaining and eas...
Definition DynamicMotionMagicDutyCycle.hpp:242
bool LimitForwardMotion
Set to true to force forward limiting.
Definition DynamicMotionMagicDutyCycle.hpp:119
DynamicMotionMagicDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition DynamicMotionMagicDutyCycle.hpp:352
DynamicMotionMagicDutyCycle & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition DynamicMotionMagicDutyCycle.hpp:433
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition DynamicMotionMagicDutyCycle.hpp:138
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition DynamicMotionMagicDutyCycle.hpp:125
DynamicMotionMagicDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition DynamicMotionMagicDutyCycle.hpp:335
DynamicMotionMagicDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition DynamicMotionMagicDutyCycle.hpp:392
DynamicMotionMagicDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition DynamicMotionMagicDutyCycle.hpp:285
DynamicMotionMagicDutyCycle & WithJerk(units::angular_jerk::turns_per_second_cubed_t newJerk)
Modifies this Control Request's Jerk parameter and returns itself for method-chaining and easier to u...
Definition DynamicMotionMagicDutyCycle.hpp:261
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition DynamicMotionMagicDutyCycle.hpp:467
DynamicMotionMagicDutyCycle & WithFeedForward(units::dimensionless::scalar_t newFeedForward)
Modifies this Control Request's FeedForward parameter and returns itself for method-chaining and easi...
Definition DynamicMotionMagicDutyCycle.hpp:300
DynamicMotionMagicDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition DynamicMotionMagicDutyCycle.hpp:369
units::angle::turn_t Position
Position to drive toward in rotations.
Definition DynamicMotionMagicDutyCycle.hpp:65
int Slot
Select which gains are applied by selecting the slot.
Definition DynamicMotionMagicDutyCycle.hpp:106
DynamicMotionMagicDutyCycle & WithPosition(units::angle::turn_t newPosition)
Modifies this Control Request's Position parameter and returns itself for method-chaining and easier ...
Definition DynamicMotionMagicDutyCycle.hpp:210
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition DynamicMotionMagicDutyCycle.hpp:149
units::dimensionless::scalar_t FeedForward
Feedforward to apply in fractional units between -1 and +1.
Definition DynamicMotionMagicDutyCycle.hpp:100
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition StatusCodes.h:18
Definition span.hpp:401