Exemple #1
0
static void timetick(unsigned int systick)
{
    if(expsp_Flag==1)//超速驾驶记录
    {
        ChaoSuNumScreen=0;//显示速度第几屏的序号
        expsp_Flag=3;//不LCD_MODE_SET能再此清0,还要进入下一级菜单
        lcd_fill(0);
        lcd_text12(0,10,"按确认键查看超速记录",20,LCD_MODE_SET);
        lcd_update_all();
    }
    else if(expsp_Flag==2)//无超速驾驶记录
    {
        expsp_Flag=0;
        lcd_fill(0);
        lcd_text12(18,10,"无超速驾驶记录",14,LCD_MODE_SET);
        lcd_update_all();
    }

    CounterBack++;
    if(CounterBack!=MaxBankIdleTime)
        return;
    pMenuItem=&Menu_1_Idle;
    pMenuItem->show();
    CounterBack=0;

    ErrorRecord=0;//疲劳超速记录错误清0
    StartDisTiredExpspeed=0;
    expsp_Flag=0;//查看超速报警记录过程标志清0;
    ChaoScreen=1;
}
static void timetick(unsigned int systick)  
{
	//u8 Reg_buf[22];  
	
if(reset_firstset==6)
	{
	reset_firstset++;
	//----------------------------------------------------------------------------------	
		JT808Conf_struct.password_flag=0;     // clear  first flag		
		Api_Config_Recwrite_Large(jt808,0,(u8*)&JT808Conf_struct,sizeof(JT808Conf_struct));    
	//----------------------------------------------------------------------------------
	}
else if((reset_firstset>=7)&&(reset_firstset<=1207))//50ms一次,,60s
	{
	if(reset_firstset==1207)
		reset_firstset=0;
	lcd_fill(0);
	lcd_text12(0,3,"需重新设置车牌号和ID",20,LCD_MODE_SET);
	lcd_text12(24,18,"重新加电查看",12,LCD_MODE_SET); 
	lcd_update_all();
	}
else
	{
	if(Antenna_open_flag)
		return;
	//循环显示待机界面
	tickcount++;
	if(tickcount>=10) 
		{
		tickcount=0;	
	    Disp_Idle();
		}
	}
}
Exemple #3
0
/******************************************************************************
 * Function: First_show () 
 * DESCRIPTION: - 每一次带有信息条号的显示 
 * Input: str 条号
 * Input: str2 信息内容
 * Output: 
 * Returns: 
 * 
 * -----------------------------------
* Created By wxg 15-jan-2014
* -------------------------------
 ******************************************************************************/
void  First_show(u8* str2 ,u8 Screen,u8 mode)
{
#if 1
    u32   addre=0;
	u8  show_buf[20];
	char T_date[22]={"00/00/00 00:00:00"};
	u8 i=0;
	memset(show_buf,0,20);
	lcd_fill(0);
	lcd_text12(0,5,number[Screen-1],strlen(number[Screen-1]),mode);
	for(i=0;i<3;i++)
		T_date[i*3]=str2[i+5]/10+'0';
	for(i=0;i<3;i++)
		T_date[1+i*3]=str2[i+5]%10+'0';

	for(i=0;i<3;i++)
		T_date[9+i*3]=str2[i+5+3]/10+'0';
	for(i=0;i<3;i++)
		T_date[10+i*3]=str2[i+5+3]%10+'0';
	lcd_text12(strlen(number[Screen-1])*6,5,T_date,17,mode);
	//rt_kprintf("mian_screen --%d---%d\r\n",strlen(number[Screen]),Screen);
	lcd_text12(0,19,"发信地址:",8,mode);
	OutPrint_HEX("addre", str2+12, 3);
	addre=(str2[12]<<16)+(str2[13]<<8)+str2[14];
	sprintf((char*)show_buf,"%d",addre);
	lcd_text12(60,19,(char*)show_buf,strlen((char*)show_buf),mode);
	lcd_update_all();
	#endif
}
Exemple #4
0
void Vin_Set(u8 par,u8 type1_2,u8 invert)
{
	lcd_fill(0);
	lcd_text12(0,3,(char *)Menu_Vin_Code,VIN_SetFlag-1,LCD_MODE_SET);
	if(invert==1)
		{
		if(VIN_SetFlag_Temp>=2)
			lcd_text12((VIN_SetFlag_Temp-2)*6,3,(char *)&Menu_Vin_Code[VIN_SetFlag_Temp-2],1,LCD_MODE_INVERT);
		}
	else
		{
		if(invert==2)
			{
			if(VIN_SetFlag_Temp>=2)
				lcd_text12((VIN_SetFlag_Temp-2)*6,3,(char *)&Menu_Vin_Code[VIN_SetFlag_Temp-2],1,LCD_MODE_INVERT);
			}
		if(type1_2==1)
			{
			lcd_bitmap(par*Sim_width1, 14, &BMP_select_vin, LCD_MODE_SET);
			lcd_text12(0,19,"0123456789ABCDEFGHIJ",20,LCD_MODE_SET);
			}
		else
			{
			lcd_bitmap((par-20)*Sim_width1, 14, &BMP_select_vin, LCD_MODE_SET);
			lcd_text12(0,19,"KLMNOPQRSTUVWXYZ",16,LCD_MODE_SET);
			}
		}

	lcd_update_all();
}
Exemple #5
0
/******************************************************************************
 * Function: Auto_line_show () 
 * DESCRIPTION: - 自动换行显示函数 
 * Input: str 内容
 * Input: 
 * Output: 
 * Returns: 
 * 
 * -----------------------------------
* Created By wxg 15-jan-2014
* -------------------------------
 ******************************************************************************/
u8  Auto_line_show( u8 *str , u8 len )
{
	u8 remain_len=0;
    if(len <=20)
	{

		lcd_fill(0);
		lcd_text12(0,5,str,len-Find_ascii(str ),LCD_MODE_SET);
		lcd_update_all();
		remain_len =Find_ascii(str );
		lcd_update_all();
	}
	if(20<len<=40 )
	{
		lcd_fill(0);
		lcd_text12(0,5,str,20- Find_ascii(str ),LCD_MODE_SET);
		lcd_text12(0,5,str+20- Find_ascii(str ),len-(20- Find_ascii(str+20- Find_ascii(str ))),LCD_MODE_SET);
		lcd_update_all();
		remain_len =Find_ascii(str )+Find_ascii(str+20- Find_ascii(str ));
		lcd_update_all();
	}
	if(len>40)
	{
		lcd_fill(0);
		lcd_text12(0,5,str,20-Find_ascii(str ),LCD_MODE_SET);
		lcd_text12(0,5,str+20-Find_ascii(str ),20-Find_ascii(str+20- Find_ascii(str )),LCD_MODE_SET);
		lcd_update_all();
		remain_len =len-(40-Find_ascii(str )-Find_ascii(str+20- Find_ascii(str )));
		lcd_update_all();
	}
	
	return remain_len ;
}
static void show(void)
	{
	lcd_fill(0);
	lcd_text12(24,3,"查看设置信息",12,LCD_MODE_SET);
	lcd_text12(30,18,"请按确认键",10,LCD_MODE_SET);
	lcd_update_all();
	}
static void show(void)
{
	lcd_fill(0);
	lcd_text12(24, 3,"车辆信息查看",12,LCD_MODE_SET);
	lcd_text12(24,19,"查看请按选择",12,LCD_MODE_SET);
	lcd_update_all();

}
static void keypress(unsigned int key)
{

	switch(KeyValue)
		{
		case KeyValueMenu:
			pMenuItem=&Menu_5_other;
			pMenuItem->show();
			CounterBack=0;

			concuss_screen=0;
			break;
			
		case KeyValueOk:
			if(concuss_screen==0)
				{
				concuss_screen=1;
				JT808Conf_struct.concuss_step=concuss_step;
				Api_Config_Recwrite_Large(jt808,0,(u8*)&JT808Conf_struct,sizeof(JT808Conf_struct));
			

                concuss_dis[9]=concuss_step/10+'0';
				concuss_dis[10]=concuss_step%10+'0';
				lcd_fill(0);
				lcd_text12(20,3,"震动级别设置成功",16,LCD_MODE_SET);
				lcd_text12(30,19,(char *)concuss_dis,sizeof(concuss_dis),LCD_MODE_SET);
				lcd_update_all();
				}
			break;
			
		case KeyValueUP:
			 if(concuss_step==0)
				concuss_step=79;
			else if(concuss_step>=1)
				concuss_step--;
			
			concuss_dis[9]=concuss_step/10+'0';
			concuss_dis[10]=concuss_step%10+'0';
			lcd_fill(0);
			lcd_text12(30,10,(char *)concuss_dis,sizeof(concuss_dis),LCD_MODE_SET);
			lcd_update_all();
						
			break;
			
		case KeyValueDown:
			concuss_step++;
			if(concuss_step>79)
				concuss_step=0;
			
			concuss_dis[9]=concuss_step/10+'0';
			concuss_dis[10]=concuss_step%10+'0';
			lcd_fill(0);
			lcd_text12(30,10,(char *)concuss_dis,sizeof(concuss_dis),LCD_MODE_SET);
			lcd_update_all();
			break;	
		}
 KeyValue=0;
}
static void show(void)
	{
	screen_2_8_counter=1;
	lcd_fill(0);
	lcd_text12(24,3,"查看设置信息",12,LCD_MODE_SET);
	lcd_text12(30,18,"请按确认键",10,LCD_MODE_SET);
	lcd_update_all();
	MenuIdle_working=0;//clear
	}
Exemple #10
0
static void show(void)
{
License_set_noeffect=1;

lcd_fill(0);
lcd_text12(0,3,"���ó��ƺ�",10,LCD_MODE_INVERT);
lcd_text12(0,18,"�����ճ���",10,LCD_MODE_SET);
lcd_update_all();
}
static void show(void)
{
License_set_noeffect=1;

lcd_fill(0);
lcd_text12(0,3,"设置车牌号",10,LCD_MODE_INVERT);
lcd_text12(0,18,"无牌照车辆",10,LCD_MODE_SET);
lcd_update_all();
}
static void show(void)
{
lcd_fill(0);
lcd_text12(0, 3,"货运模式",8,LCD_MODE_INVERT);
lcd_text12(0,18,"两客一危模式",12,LCD_MODE_SET); 
lcd_update_all();
type_selc_flag=1;
type_selc_screen=1;
}
static void ic_self(unsigned char par)
{
lcd_fill(0);
lcd_text12(0, 5,"IC检测  系统自检",16,LCD_MODE_SET);
if(par==1)
	lcd_text12( 0,  5,"IC检测",6,LCD_MODE_INVERT);
else if(par==2)
	lcd_text12(48,  5,"系统自检",8,LCD_MODE_INVERT);
lcd_update_all();
}
Exemple #14
0
void version_disp(void)
{
	lcd_fill(0);
	lcd_text12(0, 3,(char *)device_version,strlen((const char*)device_version),LCD_MODE_SET); 
	if(Module_3017A==GPS_MODULE_TYPE)
	   lcd_text12(0,19,(char *)bd_version,sizeof(bd_version),LCD_MODE_SET);
	else
	   lcd_text12(0,19,(char *)bd_version2,sizeof(bd_version2),LCD_MODE_SET); 	
	lcd_update_all();
}
void Sim_Set(u8 par)
{
	lcd_fill(0);
	lcd_text12(0,3,(char *)Menu_sim_Code,Sim_SetFlag-1,LCD_MODE_SET);
	
	lcd_bitmap(par*Sim_width1, 14, &BMP_select_Sim, LCD_MODE_SET);
	lcd_text12(0,19,"0123456789",10,LCD_MODE_SET);

	lcd_update_all();
}
void password_Set(u8 par)
{
    lcd_fill(0);
    lcd_text12(0,3,"请输入6位密码:",14,LCD_MODE_SET);
    if(password_SetFlag>1)
        lcd_text12(84,3,(char *)password_Code,password_SetFlag-1,LCD_MODE_SET);//-1+14
    lcd_bitmap(par*Sim_width1, 14, &BMP_password_icon, LCD_MODE_SET);
    lcd_text12(0,19,"0123456789",10,LCD_MODE_SET);
    lcd_update_all();
}
static void keypress(unsigned int key)
{
switch(KeyValue)
	{
	case KeyValueMenu:
		pMenuItem=&Menu_9_Urgent;//scr_CarMulTrans;
		pMenuItem->show();
		CounterBack=0;

		break;
	case KeyValueOk:
		
		
		if(1==IC_or_test)
		{
		   lcd_fill(0);
			//BD1_Tx(BD1_TYPE_ICJC, 0, 1);
			BD_IC.status=result_Artificial;
			lcd_text12(10,10,"IC检测指令已发出",16,LCD_MODE_SET);
			lcd_update_all();
			//rt_kprintf("tset-----BD_IC.status %d\r\n",BD_IC.status);
			
		}
		if(2==IC_or_test)
		{
			lcd_fill(0);
			//BD1_Tx(BD1_TYPE_XTZJ,0,2);
			BD_ZJ.status=result_pending;
			lcd_text12(4,4,"系统检测指令已发出",18,LCD_MODE_SET);
			lcd_text12(4,19,"等待回复.....",13,LCD_MODE_SET);
			lcd_update_all();
			BD_ZJ.status=result_Artificial;
			//rt_kprintf("tset-----BD_ZJ.status %d\r\n",BD_ZJ.status);
		}
		
		//SD_ACKflag.f_Worklist_SD_0701H=1;//按键选择发送电子运单标志
		/*
		  这里添加发送IC检测的标志
		*/
		break;
	case KeyValueUP:
		IC_or_test++;
		if(IC_or_test>2)
		IC_or_test=1;
		ic_self(IC_or_test);
		break;
	case KeyValueDown:
		IC_or_test--;
		if(IC_or_test<1)
		IC_or_test=2;
		ic_self(IC_or_test);
		break;
	}
KeyValue=0;
}
static void show(void)
{
CounterBack=0;

SpdType_flag=1;
lcd_fill(0);
lcd_text12(24,3,"车辆速度选择",12,LCD_MODE_SET);
lcd_text12(0,19,"GPS速度   传感器速度",20,LCD_MODE_SET);
lcd_text12(0,19,"GPS速度",7,LCD_MODE_INVERT); 
lcd_update_all();
}
void CarStatus(unsigned char Status)
{
unsigned char i=0;

	lcd_fill(0);
	lcd_text12(12,3,"³µÁ¾¸ºÔØ״̬ѡÔñ",16,LCD_MODE_SET);
	for(i=0;i<3;i++)
		lcd_text12(20+i*30,19,(char *)car_status_str[i],4,LCD_MODE_SET);
	lcd_text12(20+30*Status,19,(char *)car_status_str[Status],4,LCD_MODE_INVERT);
	lcd_update_all();
}
static void sel_usb_com(u8 par)
{
lcd_fill(0);
lcd_text12(0, 3,"1.USB数据导出",13, LCD_MODE_SET);
lcd_text12(0,18,"2.串口数据导出",14, LCD_MODE_SET);
if(par==1)
	lcd_text12(0, 3,"1.USB数据导出",13, LCD_MODE_INVERT);
else
	lcd_text12(0,18,"2.串口数据导出",14, LCD_MODE_INVERT);
lcd_update_all();
}
void USB_OUTFileSe(unsigned char OutType)
{
	lcd_fill(0);
	if(OutType==1)
		lcd_text12(0,3,"1.指定的事故疑点记录",20,LCD_MODE_SET);
	else if(OutType==2)
		lcd_text12(0,3,"2.指定的疲劳驾驶记录",20,LCD_MODE_SET);
	else if(OutType==3)
	    lcd_text12(0,3,"3.指定的超速驾驶记录",20,LCD_MODE_SET);
	lcd_update_all();
}
void DIS_MEUN_1(u8 screen)
{
char InforNum[20]={"0.消息内容查看"};
if((screen>=1)&&(screen<=8))
	{
	InforNum[0]='0'+screen;
	lcd_fill(0);
	lcd_text12(36, 3,"文字消息",8,LCD_MODE_SET);
	lcd_text12(0, 19,(char *)InforNum,14,LCD_MODE_SET);
	lcd_update_all();
	}
}
void DIS_MEUN_2(u8 screen)
{
char InforNum[2]={"0."};
if((screen>=1)&&(screen<=8))
	{
	InforNum[0]='0'+screen;
	lcd_fill(0);
	lcd_text12(0, 10,(char *)InforNum,2,LCD_MODE_SET);
	lcd_text12(20,10,(char *)TEXT_Obj_8[screen-1].TEXT_STR,TEXT_Obj_8[screen-1].TEXT_LEN,LCD_MODE_SET);
	lcd_update_all();
	}
}
static void menuswitch(void)
{
	unsigned char i;
	lcd_fill(0);
	lcd_text12(0,3,"信息",4,LCD_MODE_SET);
	lcd_text12(0,17,"查看",4,LCD_MODE_SET);
	for(i=0;i<7;i++) 
		lcd_bitmap(30+i*DIS_Dur_width_check, 5, &BMP_noselect_check, LCD_MODE_SET);
	lcd_bitmap(30+menu_pos*DIS_Dur_width_check,5, &BMP_select_check, LCD_MODE_SET);
	lcd_text12(30,19,(char *)(psubmenu[menu_pos]->caption),psubmenu[menu_pos]->len,LCD_MODE_SET);
	lcd_update_all();
}
void License_Set(u8 par,u8 type1_2)
{
	lcd_fill(0);
	lcd_text12(0,0,(char *)Menu_Car_license,License_SetFlag-1,LCD_MODE_SET);
	//组内反向选择
	if(License_Modify_Flag==3)
		{
		//rt_kprintf("\r\n(组内)反向选择,License_SetFlag_temp=%d",License_SetFlag_temp);
		if(License_SetFlag==3)
			lcd_text12(0,0,(char *)&Menu_Car_license[0],2,LCD_MODE_INVERT);
		else
			lcd_text12((License_SetFlag_temp-2)*6,0,(char *)&Menu_Car_license[License_SetFlag_temp-2],1,LCD_MODE_INVERT);
		}
	if(type1_2==1)
		{
		lcd_bitmap(par*width_zf, 14, &BMP_select_License, LCD_MODE_SET);
		lcd_text12(0,19,"0123456789",10,LCD_MODE_SET);
		}
	else if(type1_2==2)
		{
		lcd_bitmap(par*width_zf, 14, &BMP_select_License, LCD_MODE_SET);
		lcd_text12(0,19,"ABCDEFGHIJKLM",13,LCD_MODE_SET);
		}
	else if(type1_2==3)
		{
		lcd_bitmap(par*width_zf, 14, &BMP_select_License, LCD_MODE_SET);
		lcd_text12(0,19,"NOPQRSTUVWXYZ",13,LCD_MODE_SET);
		}
	else if(type1_2==4)
		{
		if(License_SetCounter_3<=9)
			{
			lcd_bitmap(3+par*width_hz, 14, &BMP_select_License, LCD_MODE_SET);
	        lcd_text12(0,20,"冀京津沪渝豫云辽黑湘",20,LCD_MODE_SET);
			}
		else if((License_SetCounter_3>=10)&&(License_SetCounter_3<=19))
			{
			lcd_bitmap(3+(par-10)*width_hz, 14, &BMP_select_License, LCD_MODE_SET);
	        lcd_text12(0,20,"皖鲁新苏浙赣鄂桂甘晋",20,LCD_MODE_SET);
			}
		else if((License_SetCounter_3>=20)&&(License_SetCounter_3<=29))
			{
			lcd_bitmap(3+(par-20)*width_hz, 14, &BMP_select_License, LCD_MODE_SET);
	        lcd_text12(0,20,"蒙陕吉闽贵粤青藏川宁",20,LCD_MODE_SET);
			}
		else if(License_SetCounter_3==30)
			{
			lcd_bitmap(3+(par-30)*width_hz, 14, &BMP_select_License, LCD_MODE_SET);
	        lcd_text12(0,20,"琼",2,LCD_MODE_SET);
			}
		}
	lcd_update_all();
}
void menuswitch(void)
{
unsigned char i=0;

	lcd_fill(0);
	lcd_text12(0,3,"信息",4,LCD_MODE_SET);
	lcd_text12(0,17,"交互",4,LCD_MODE_SET);
	for(i=0;i<8;i++)
		lcd_bitmap(30+i*DIS_Dur_width_inter, 5, &BMP_noselect_inter, LCD_MODE_SET);
    lcd_bitmap(30+menu_pos_3*DIS_Dur_width_inter, 5, &BMP_select_inter, LCD_MODE_SET);
    lcd_text12(30,19,(char *)(psubmenu[menu_pos_3]->caption),psubmenu[menu_pos_3]->len,LCD_MODE_SET);
	lcd_update_all();
}
/*
���򼽻���ԥ����
������³�������
����ʽ����¼���������ش�����

offset:  type==2ʱ����    ==1ʱ����
*/
void license_input_az09(unsigned char type,unsigned char offset,unsigned char par)
{
if((type==1)&&(par>=1)&&(par<=31))
	{
	memcpy(Menu_Car_license,(char *)Car_HZ_code[par-1],2);
	lcd_text12(0,0,(char *)Menu_Car_license,2,LCD_MODE_SET);
	}
else if((type==2)&&(par>=1)&&(par<=36))
	{
	 memcpy(Menu_Car_license+offset-1,(char *)Car_num_code[par-1],1);
	 lcd_text12(0,0,(char *)Menu_Car_license,offset,LCD_MODE_SET);//Car_license+2+(offset-3)=Car_license+offset-1
 	}
}
static void data_export(u8 par)  //  1:usb   2:com
{
lcd_fill(0);
lcd_text12(0, 3,"1.所有数据2.推荐数据",20, LCD_MODE_SET);
lcd_text12(0,18,"3.指定数据(00H-15H)",19, LCD_MODE_SET);
if(par==1)
	lcd_text12(0, 3,"1.所有数据",10, LCD_MODE_INVERT);
else if(par==2)
	lcd_text12(60, 3,"2.推荐数据",10, LCD_MODE_INVERT);
else if(par==3)
	lcd_text12(0,18,"3.指定数据(00H-15H)",19, LCD_MODE_INVERT);
lcd_update_all();
}
void  disp_record_11h(u8 record_num)
{

      get_11h(get_indexnum-record_num,H11_reg);
          
		  memcpy(Dis_status+2,H11_reg,18);
		  sprintf(Dis_start_time,"st:%2X-%2X-%2X %2X:%2X:%2X",H11_reg[18],H11_reg[19],H11_reg[20],H11_reg[21],H11_reg[22],H11_reg[23]);
		  sprintf(Dis_end_time,"ed:%2X-%2X-%2X %2X:%2X:%2X",H11_reg[24],H11_reg[25],H11_reg[26],H11_reg[27],H11_reg[28],H11_reg[29]);
		lcd_fill(0);
		lcd_text12(0,0,Dis_status,strlen(Dis_status), LCD_MODE_SET);
		lcd_text12(0,12,Dis_start_time,strlen(Dis_start_time), LCD_MODE_SET);
		lcd_text12(0,22,Dis_end_time,strlen(Dis_end_time), LCD_MODE_SET);
		lcd_update_all();
}
Exemple #30
0
//中心下发消息或者条件触发显示消息函数
void Cent_To_Disp(void)
{
	if(Dis_deviceid_flag==1)
		{
		Dis_deviceid_flag=2; 
		lcd_fill(0);
		lcd_text12(0,3,"设备ID:",7,LCD_MODE_SET); 
		lcd_text12(42,3,(char *)DeviceNumberID,12,LCD_MODE_SET);
		lcd_text12(0,18,"终端ID:",7,LCD_MODE_SET); 
		lcd_text12(42,18,(char *)DeviceNumberID+5,7,LCD_MODE_SET);
		lcd_update_all();  
		}

}