⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parachk.c

📁 在ARM7和UC/OSII的平台上实现了GPS自动报站的功能,涉及GPS模块LEA_4S的驱动,位置速寻算法,语音芯片ISD4004的录放音驱动,LED页面管理等等.从启动代码到操作系统的移植以及到业
💻 C
字号:
/******************
*   Parachk.c		*
******************/
#define PARACHK_GLOBALS
#include "includes.h"
#include "public.h"
#include "Prompt.h"
#include "gprsdrv.h"
#include "Alarmer.h"
#include "GpsRecer.h"
#include "ItemMenu.h"
#include "Parachk.h"

#include "debug.h"
#if EN_HANDSET > 0

static PROMPT_STRUCT ParaPrompt;

static void GetCenterNo(void)
{
	if(PubParaValid(ALARMTEL_))
	 {
		ParaPrompt.Mode        = 0;
    	ParaPrompt.LiveTime    = 0;
    	ParaPrompt.TextPtr     = (INT8U *)AlarmTel.tel;
    	ParaPrompt.TextLen     = AlarmTel.len;
    	ParaPrompt.ExitProc    = 0;
    	ParaPrompt.ExitKeyProc = 0;
    	ActivatePrompt(&ParaPrompt);
	 }
	else ActivateStringPrompt("特服号无设置");
}

static void GetGPRSStatus(void)
{
	if(GprsIsOnline()) ActivateStringPrompt_TIME("GPRS在线",0);
	else ActivateStringPrompt_TIME("GPRS不在线",0);
}

static void GetGPSStatus(void)
{
	if(GpsDataValid()) ActivateStringPrompt_TIME("GPS数据有效",0);
	else ActivateStringPrompt_TIME("GPS数据无效",0);
}

static void GetAlarmStatus(void)
{
	INT16U Type;
	Type=GetAlarmType();
	if(Type==0x0101) ActivateStringPrompt_TIME("当前无报警",0);
	else if(Type&0x2000) ActivateStringPrompt_TIME("振动报警",0);
	else if(Type&0x4000) ActivateStringPrompt_TIME("开车门报警",0);
	else if(Type&0x0400) ActivateStringPrompt_TIME("越界报警",0);
	else if(Type&0x0800) ActivateStringPrompt_TIME("超速报警",0);
	else if(Type&0x0200) ActivateStringPrompt_TIME("欠压报警",0);
	else if(Type&0x0020) ActivateStringPrompt_TIME("抢劫报警",0);
	else if(Type&0x0002) ActivateStringPrompt_TIME("测试报警",0);
	else ActivateStringPrompt_TIME("未知类型",0);
}

static void GetCallRht(void)
{
	if(PubParaValid(CALLRHT_))	ActivateStringPrompt_TIME("设置正常",0);
	else ActivateStringPrompt_TIME("设置不正常",0);
}

static ITEMMENU_STRUCT MENU_CENTERNO	= {ITEM_FCN,  "中心特服号",GetCenterNo,0,0};
static ITEMMENU_STRUCT MENU_GPRSSTATUS	= {ITEM_FCN,  "GPRS状态" ,GetGPRSStatus,0,0};
static ITEMMENU_STRUCT MENU_GPSSTATUS	= {ITEM_FCN,  "定位状态"  ,GetGPSStatus,0,0};
static ITEMMENU_STRUCT MENU_ALARMSTATUS	= {ITEM_FCN,  "报警状态"  ,GetAlarmStatus,0,0};
static ITEMMENU_STRUCT MENU_CALLRHTSTATUS={ITEM_FCN, "呼叫限制状态",GetCallRht,0,0};
static ITEMMENU_STRUCT *MENU_PARACHK_CHILD[] ={&MENU_CENTERNO,
															  &MENU_GPRSSTATUS,
															  &MENU_GPSSTATUS,
															  &MENU_ALARMSTATUS,
															  &MENU_CALLRHTSTATUS
															 };

ITEMMENU_STRUCT MENU_PARACHK = {ITEM_LMENU,"参数状态查询",0,5,MENU_PARACHK_CHILD};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -