update DeviceParam_t
This commit is contained in:
parent
7926184501
commit
6dcc87aa59
@ -46,6 +46,10 @@ DeviceParam_t dp = {
|
||||
.valve = {
|
||||
{"valve1", 1, 10, 100, 100,47620,0},
|
||||
{"valve2", 2, 10, 100, 100,47620,0}
|
||||
},
|
||||
.sensor = {
|
||||
{169, 254, 1, 1}, // 设置IP为169.254.1.1
|
||||
"/index.xml" // 设置路径为/index.xml
|
||||
}
|
||||
};
|
||||
|
||||
@ -1350,10 +1354,10 @@ static void packMsgToHost(uint16_t funcCode, uint8_t isOK) {
|
||||
// 初始化处理
|
||||
static uint8_t HandleInit(void) {
|
||||
// 实现初始化逻辑
|
||||
// 1.更新状态为“初始化中”
|
||||
// 1.更新状态为"初始化中"
|
||||
// 2.执行默认的初始化内容,此步骤系统上电后会自动执行
|
||||
// 3.执行协议初始化流程
|
||||
// 4.检查初始化结果,更新状态“成功”或“失败”
|
||||
// 4.检查初始化结果,更新状态"成功"或"失败"
|
||||
|
||||
// 3.协议要求内容为:2个三通阀步进电机堵转找原点,重复至少2次,然后各自转至120°。
|
||||
|
||||
|
@ -427,11 +427,17 @@ typedef struct {
|
||||
uint8_t timeout;//回归超时时间,单位s
|
||||
} MotorDefaultParam_t;
|
||||
|
||||
typedef struct protocol
|
||||
{
|
||||
uint8_t IP[4];
|
||||
char path[20];
|
||||
}SensorParam_t;
|
||||
|
||||
// 定义设备默认参数
|
||||
typedef struct {
|
||||
MotorDefaultParam_t pump[2];
|
||||
MotorDefaultParam_t valve[2];
|
||||
SensorParam_t sensor;
|
||||
} DeviceParam_t;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user