添加801系统状态指令
This commit is contained in:
1 parent
0dfe8ddb1c
commit
62f9535ae6
4 files changed
+11
-11
No files matched your search
@@ -122,6 +122,11 @@ void pasre_DAT(const char *api, const char *json_str)
|
||||
cJSON_AddItemToObject(dat,"SYSKEY",cJSON_CreateString(machine_ID));
|
||||
cJSON_AddItemToObject(dat,"Groups",cJSON_CreateString(machine_ID));
|
||||
}
|
||||
if (strcmp(api, "SC801") == 0)
|
||||
{// 处理 SC801系统信息
|
||||
cJSON_AddItemToObject(dat,"SYSTEMP",cJSON_CreateNumber(sys_temperature));
|
||||
cJSON_AddItemToObject(dat,"SYSHUM",cJSON_CreateNumber(sys_humidity));
|
||||
}
|
||||
else if (strcmp(api, "SC810") == 0)
|
||||
{
|
||||
char Work_[25];
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
#include "stdbool.h"
|
||||
|
||||
//系统信息变量
|
||||
extern rt_int32_t sys_temperature;//主机环境温度
|
||||
extern rt_int32_t sys_humidity;//主机环境湿度
|
||||
extern unsigned char sys_time[6];//系统时间
|
||||
extern unsigned int sys_run_time;//运行时间
|
||||
// ===== 字符串变量 =====
|
||||
extern char *DATA_dat;
|
||||
extern char DATA_machins[3];
|
||||
|
||||
Reference in new issue
Block a user