mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 04:58:17 +08:00
add:参数初始化
add:wifi未连接时不尝试连接mqtt服务器
This commit is contained in:
30
TC1/main.h
30
TC1/main.h
@@ -4,6 +4,14 @@
|
||||
#include "mico.h"
|
||||
#include "MiCOKit_EXT.h"
|
||||
|
||||
#define ZTC1_NAME "zTC1"
|
||||
|
||||
#define PLUG_NAME_LENGTH 32
|
||||
#define PLUG_NUM 6 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define PLUG_TIME_TASK_NUM 5 //ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5<EFBFBD>鶨ʱ<E9B6A8><CAB1><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
|
||||
#define Led MICO_GPIO_5
|
||||
#define Button MICO_GPIO_23
|
||||
|
||||
@@ -13,12 +21,30 @@
|
||||
#define Relay_3 MICO_GPIO_9
|
||||
#define Relay_4 MICO_GPIO_10
|
||||
#define Relay_5 MICO_GPIO_18
|
||||
#define Relay_NUM 6
|
||||
#define Relay_NUM PLUG_NUM
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
char hour; //Сʱ
|
||||
char minute; //<2F><><EFBFBD><EFBFBD>
|
||||
uint8_t repeat; //bit7:һ<><D2BB> bit6-0:<3A><><EFBFBD><EFBFBD>-<2D><>һ
|
||||
char on; //<2F><><EFBFBD><EFBFBD>
|
||||
|
||||
} user_plug_task_config_t;
|
||||
|
||||
typedef struct {
|
||||
char name[PLUG_NAME_LENGTH];
|
||||
char idx;
|
||||
user_plug_task_config_t task[PLUG_TIME_TASK_NUM];
|
||||
|
||||
} user_plug_config_t;
|
||||
|
||||
//<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ<EFBFBD><E1B9B9>
|
||||
typedef struct {
|
||||
char val;
|
||||
char idx;
|
||||
user_plug_config_t plug[PLUG_NUM];
|
||||
} user_config_t;
|
||||
|
||||
extern system_config_t * sys_config;
|
||||
|
||||
Reference in New Issue
Block a user