兼容金川中心灌区代码

This commit is contained in:
2584532475@qq.com committed 2024-04-08 20:39:37 +08:00
1 parent f8591b8b99
commit 3a537f633c
14 files changed
+217 -62

No files matched your search

+46 -9
View File
@@ -3,6 +3,17 @@
/******************************************
* 版本信息
******************************************/
volatile const char _makeData[] = __DATE__; //12字节,编译日期
volatile const char _makeTime[] = __TIME__; //9字节
volatile const char cBootv[] = "Ver3.0.0"; //获取时添加上面两个时间信息,最大长度64字节
char _versionTemp[64];
const StrIndex_t cDownDataType[] =
{
{"run",DownRun} ,
@@ -14,7 +25,8 @@ const StrIndex_t cDownDataType[] =
{"update",DownUpdate},
{"reboot",DownReboot},
{"config",DownConfig},
{"read",DownRead}
{"read",DownRead} ,
{"fact",DownFact}
};
@@ -24,20 +36,25 @@ const StrIndex_t cSiteType[] =
{"sluice",SiteSluice} ,
{"flow",SiteFlow} ,
{"press",SiteSee} ,
{"auto",SiteColl} ,
{"auto",SiteColl} , // 自动化采集站
{"trans",SiteServer} ,
{"level",SiteLevel}
{"level",SiteLevel},
{"skew",SiteSkew} //测斜仪
};
const StrIndex_t cMotorType[] =
{
{"mg1000",MT_MG_1000} ,
{"qh100",MT_QH_V100} ,
{"qh200",MT_QH_V200} ,
{"zs100",MT_ZS_V100} ,
{"dy100",MT_DY_V100} ,
{"kg100",MT_KG_V100}
{"qh100", MT_QH_V100} ,
{"qh200", MT_QH_V200} ,
{"zs100", MT_ZS_V100} ,
{"jz200", MT_JZ_V200} , // 金志 4-20 ma
{"dy100", MT_DY_V100}, // 大禹锥型阀
{"kg100", MT_KG_V100}, // 开关量模块
{"kr100", MT_KR_V100}, // 闸位计
{"asca3", MT_ASC_A3}, // A3 驱动器
{"ascws", MT_ASC_WS}, // A3 驱动器
};
const StrIndex_t c4851Type[] =
@@ -47,6 +64,7 @@ const StrIndex_t c4851Type[] =
{"qh200",ST_QH_V200} ,
{"dy100",ST_DY_V100} ,
{"kg100",ST_KG_V100} ,
{"at100",ST_AT_V100} ,
};
const StrIndex_t cU485Type[] =
@@ -54,6 +72,7 @@ const StrIndex_t cU485Type[] =
{"modbus",0}
};
// 485 2 通道
const StrIndex_t c4852Type[] =
{
{"rds600",ST_RDS_600} ,
@@ -61,7 +80,8 @@ const StrIndex_t c4852Type[] =
{"ht100",ST_HT_V100} ,
{"zkjszk",ST_ZK_JSZK},
{"djx100",ST_DJX_100},
{"rds300",ST_RDS_300}
{"rds300",ST_RDS_300},
{"mi600",ST_MI_600} // 测斜仪
};
@@ -98,7 +118,13 @@ const ParShallInfo_t ParShallTale[] =
SluiceData_t SluiceData[SLUICE_COUTN];
WaterData_t WaterData[WATER_COUTN];
InclinometerData_t IncData[6]; // 测斜仪数据
SysData_t SysData;
SOFTRTC_t g_SoftRtc = {
23,10,1,0,0,0
};
uint32_t g_ifconfig = 0;
uint32_t g_ifupdate = 0;
@@ -186,6 +212,17 @@ int cSiteType2Index(char * str)
/**********************************************
获取boot版本信息
**********************************************/
void *GetVersion(void)
{
int i = rt_sprintf(_versionTemp,"%s-%s %s",cBootv, _makeData, _makeTime);
_versionTemp[i] = 0;
return (void*)_versionTemp;
}