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