CTRE Phoenix 6 C++ 25.1.0
Loading...
Searching...
No Matches
pid_ff.h
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
9#include <units/angle.h>
10#include <units/angular_acceleration.h>
11#include <units/angular_velocity.h>
12#include <units/current.h>
13#include <units/dimensionless.h>
14#include <units/voltage.h>
15
16namespace ctre {
17namespace unit {
18
19#define CTRE_PID_FF_UNIT_ADD(unit_name, output) \
20 using unit_name##_per_turn = units::compound_unit<output, units::inverse<units::turns>>; \
21 using unit_name##_per_turn_t = units::unit_t<unit_name##_per_turn>; \
22 using unit_name##_per_turn_second = units::compound_unit<output, units::inverse<units::compound_unit<units::turns, units::seconds>>>; \
23 using unit_name##_per_turn_second_t = units::unit_t<unit_name##_per_turn_second>; \
24 using unit_name##_per_turn_per_second = units::compound_unit<output, units::inverse<units::turns_per_second>>; \
25 using unit_name##_per_turn_per_second_t = units::unit_t<unit_name##_per_turn_per_second>; \
26 using unit_name##_per_turn_per_second_squared = units::compound_unit<output, units::inverse<units::turns_per_second_squared>>; \
27 using unit_name##_per_turn_per_second_squared_t = units::unit_t<unit_name##_per_turn_per_second_squared>;
28
29 CTRE_PID_FF_UNIT_ADD(scalar, units::scalar)
30 CTRE_PID_FF_UNIT_ADD(volts, units::volts)
31 CTRE_PID_FF_UNIT_ADD(amperes, units::amperes)
32
33}
34}
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18
#define CTRE_PID_FF_UNIT_ADD(unit_name, output)
Definition pid_ff.h:19