重定向log_*
This commit is contained in:
parent
4e8fd78421
commit
2c124de7f3
20
protocol.h
20
protocol.h
@ -8,13 +8,13 @@
|
||||
#define LOG_TAG "motor"
|
||||
#include <elog.h>
|
||||
#else
|
||||
// 重定向log_e等函数到printf
|
||||
#define log_e printf
|
||||
#define log_i printf
|
||||
#define log_d printf
|
||||
#define log_w printf
|
||||
|
||||
// 重定向log_e等函数到printf,并自动添加换行符
|
||||
#define log_e(format, ...) printf(format "\r\n", ##__VA_ARGS__)
|
||||
#define log_i(format, ...) printf(format "\r\n", ##__VA_ARGS__)
|
||||
#define log_d(format, ...) printf(format "\r\n", ##__VA_ARGS__)
|
||||
#define log_w(format, ...) printf(format "\r\n", ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// 帧头帧尾定义
|
||||
#define FRAME_HEADER 0xA55A5AA5
|
||||
#define FRAME_TAIL 0x5AA5A55A
|
||||
@ -112,7 +112,7 @@ static const uint8_t alarmInfo[16][50]={
|
||||
"驱动器过压",
|
||||
"驱动器欠压",
|
||||
"驱动器过流",
|
||||
"电机绕组开关",
|
||||
"电机绕组开<EFBFBD><EFBFBD>",
|
||||
"电机编码器信号错误",
|
||||
"通讯异常",
|
||||
"参数保存失败",
|
||||
@ -282,7 +282,7 @@ static const uint8_t statusInfo[16][60]={
|
||||
+------------------------------------+------------+
|
||||
| 使电机准备 | 0380h |
|
||||
+------------------------------------+------------+
|
||||
| 使电机失能 | 0380h |
|
||||
| 使电机<EFBFBD><EFBFBD><EFBFBD>能 | 0380h |
|
||||
+------------------------------------+------------+
|
||||
| 使电机使能 | 0380h |
|
||||
+------------------------------------+------------+
|
||||
@ -305,7 +305,7 @@ static const uint8_t statusInfo[16][60]={
|
||||
|
||||
#define RTU_VALVE_CMD_HOME_MODE 0x0416 // 阀门原点回归方式
|
||||
#define RTU_VALVE_CMD_HOME_SWT_SPEED 0x0417 // 阀门回归寻找开关的速度
|
||||
#define RTU_VALVE_CMD_HOME_ORI_SPEED 0x0419 // 阀门回归寻找原点的速度
|
||||
#define RTU_VALVE_CMD_HOME_ORI_SPEED 0x0419 // 阀门回归寻找<EFBFBD><EFBFBD><EFBFBD>点的速度
|
||||
#define RTU_VALVE_CMD_HOME_ACCEL 0x041B // 阀门回归加速度
|
||||
#define RTU_VALVE_CMD_FUNC 0x0380 // 阀门控制
|
||||
#define RTU_VALVE_CMD_HOME_TORQUE 0x0170 // 阀门原点回归堵转检测力矩
|
||||
@ -406,7 +406,7 @@ typedef struct {
|
||||
} MotorDefaultParam;
|
||||
|
||||
|
||||
// 定义设备默认参数
|
||||
// 定义设备<EFBFBD><EFBFBD>认参数
|
||||
typedef struct {
|
||||
MotorDefaultParam pump[2];
|
||||
MotorDefaultParam valve[2];
|
||||
|
Loading…
Reference in New Issue
Block a user