One Motor 0.5.1
RoboMaster全平台一站式电机驱动库
|
J4310 电机 CAN 帧定义 更多...
类 | |
struct | OneMotor::Motor::DM::J4310Status |
J4310 电机状态结构体 更多... | |
枚举 | |
enum class | OneMotor::Motor::DM::DMStatus { Disabled = 0 , Enabled = 1 , OverVoltage = 8 , UnderVoltage = 9 , OverCurrent = 0xA , MosOverheat = 0xB , RotorOverheat = 0xC , Disconnected = 0xD , Overloaded = 0xE } |
DM 系列电机状态枚举 更多... | |
函数 | |
constexpr float | OneMotor::Motor::DM::uint_to_float (const int x_int, const float x_min, const float x_max, const int bits) |
将无符号整数转换为浮点数 | |
constexpr int | OneMotor::Motor::DM::float_to_uint (const float x, const float x_min, const float x_max, const int bits) |
将浮点数转换为无符号整数 | |
变量 | |
constexpr float | OneMotor::Motor::DM::DM_V_MIN = -45.0f |
电机参数限制 | |
constexpr float | OneMotor::Motor::DM::DM_V_MAX = 45.0f |
rad/s | |
constexpr float | OneMotor::Motor::DM::DM_P_MIN = -12.5f |
rad | |
constexpr float | OneMotor::Motor::DM::DM_P_MAX = 12.5f |
rad | |
constexpr float | OneMotor::Motor::DM::DM_T_MIN = -18.0f |
N*m | |
constexpr float | OneMotor::Motor::DM::DM_T_MAX = 18.0f |
N*m | |
constexpr float | OneMotor::Motor::DM::DM_KP_MIN = 0.0f |
constexpr float | OneMotor::Motor::DM::DM_KP_MAX = 500.0f |
constexpr float | OneMotor::Motor::DM::DM_KD_MIN = 0.0f |
constexpr float | OneMotor::Motor::DM::DM_KD_MAX = 5.0f |
J4310 电机 CAN 帧定义
|
strong |
|
constexpr |
将浮点数转换为无符号整数
x | 要转换的浮点数 |
x_min | 浮点数范围的最小值 |
x_max | 浮点数范围的最大值 |
bits | 无符号整数的位数 |
|
constexpr |
将无符号整数转换为浮点数
x_int | 要转换的无符号整数 |
x_min | 浮点数范围的最小值 |
x_max | 浮点数范围的最大值 |
bits | 无符号整数的位数 |
|
constexpr |
电机参数限制
rad/s