update DeviceParam_t

This commit is contained in:
CSSC-WORK\murmur 2024-12-30 16:09:55 +08:00
parent 7926184501
commit 6dcc87aa59
2 changed files with 12 additions and 2 deletions

View File

@ -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°。

View File

@ -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;