update to static
This commit is contained in:
parent
781aecfbf4
commit
2877853cf1
@ -11,7 +11,7 @@ static DeviceStatus deviceStatus = {
|
||||
.initStatus = 1
|
||||
};
|
||||
|
||||
DeviceDefaultParam dp = {{
|
||||
DeviceParam dp = {{
|
||||
{"pump1", 1, 100, 100, 100},
|
||||
{"pump2", 2, 100, 100, 100},
|
||||
{"valve1", 3, 100, 100, 100},
|
||||
|
16
protocol.h
16
protocol.h
@ -9,10 +9,10 @@
|
||||
#include <elog.h>
|
||||
#else
|
||||
// 重定向log_e等函数到printf
|
||||
void log_e(const char *fmt, ...) { printf(fmt); }
|
||||
void log_i(const char *fmt, ...) { printf(fmt); }
|
||||
void log_d(const char *fmt, ...) { printf(fmt); }
|
||||
void log_w(const char *fmt, ...) { printf(fmt); }
|
||||
#define log_e printf
|
||||
#define log_i printf
|
||||
#define log_d printf
|
||||
#define log_w printf
|
||||
|
||||
#endif
|
||||
// 帧头帧尾定义
|
||||
@ -96,7 +96,7 @@ typedef union {
|
||||
}AlarmCode_t;
|
||||
|
||||
// 用于输出具体的告警信息字符串
|
||||
const uint8_t alarmInfo[16][32]={
|
||||
static const uint8_t alarmInfo[16][32]={
|
||||
"位置误差超限",
|
||||
"CCW方向禁止限位",
|
||||
"CW方向禁止限位",
|
||||
@ -160,7 +160,7 @@ typedef union {
|
||||
} bits;
|
||||
uint16_t all;
|
||||
} StatusCode_t;
|
||||
const uint8_t statusInfo[16][32]={
|
||||
static const uint8_t statusInfo[16][32]={
|
||||
"使能",
|
||||
"采样中(软件示波器功能开启)",
|
||||
"驱动器报故障",
|
||||
@ -402,10 +402,10 @@ typedef struct {
|
||||
typedef struct {
|
||||
MotorDefaultParam pump[2];
|
||||
MotorDefaultParam valve[2];
|
||||
} DeviceDefaultParam;
|
||||
} DeviceParam;
|
||||
|
||||
|
||||
extern DeviceDefaultParam dp;
|
||||
extern DeviceParam dp;
|
||||
|
||||
// 函数声明
|
||||
CmdFrameError_t ProcessHostCommand(uint8_t *rxBuf, uint16_t rxLen);
|
||||
|
Loading…
Reference in New Issue
Block a user