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