#include <limits.h>
#include "tap/util_macros.hpp"
#include "modm/architecture/interface/can_message.hpp"
#include "dji_motor_ids.hpp"
Go to the source code of this file.
◆ DJI_MOTOR_TO_NORMALIZED_ID
| #define DJI_MOTOR_TO_NORMALIZED_ID |
( |
|
id | ) |
|
Value: static_cast<uint32_t>( \
static constexpr int DJI_MOTORS_PER_CAN
Definition dji_motor_tx_handler.hpp:77
@ MOTOR1
Definition dji_motor_ids.hpp:39
Converts the dji MotorId to a uint32_t.
- Parameters
-
- Returns
- id normalized to be around [0, DJI_MOTORS_PER_CAN), or some value >= DJI_MOTORS_PER_CAN if the id is out of bounds
◆ NORMALIZED_ID_TO_DJI_MOTOR
Converts the dji MotorId to a uint32_t.
- Parameters
-
| [in] | idx | Some index, a motor id index normalized between [0, DJI_MOTORS_PER_CAN) |
- Returns
- idx, converted to a MotorId