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; }
//驾驶员代码 void Display_driver(u8 drivercar) { u8 color_disp[4]; switch(drivercar) { case 1: //车牌号JT808Conf_struct.Vechicle_Info.Vech_Num memcpy(vech_num+7,JT808Conf_struct.Vechicle_Info.Vech_Num,8); //车辆颜色 memset(color_disp,0,sizeof(color_disp)); switch(JT808Conf_struct.Vechicle_Info.Dev_Color) { case 1: memcpy(color_disp,"蓝色",4);break; case 2:memcpy(color_disp,"黄色",4);break; case 3:memcpy(color_disp,"黑色",4);break; case 4:memcpy(color_disp,"白色",4);break; case 9:memcpy(color_disp,"其他",4);break; default:memcpy(color_disp,"蓝色",4);break; } lcd_fill(0); lcd_text12(10,3,(char *)vech_num,15,LCD_MODE_SET); lcd_text12(10,19,"车牌颜色:",9,LCD_MODE_SET); lcd_text12(64,19,color_disp,4,LCD_MODE_SET); lcd_update_all(); break; case 2://车辆ID Vechicle_Info.DevicePhone lcd_fill(0); memcpy(vech_type+9,JT808Conf_struct.Vechicle_Info.Vech_Type,6); lcd_text12(0,3,(char *)vech_type,19,LCD_MODE_SET); //读取设备速度取得是GPS速度还是速度线速度 if(JT808Conf_struct.DF_K_adjustState) lcd_text12(0,18,"设备速度:传感器速度",19,LCD_MODE_SET); else lcd_text12(0,18,"设备速度:GPS速度",16,LCD_MODE_SET); lcd_update_all(); break; case 3: // 车辆ID及车辆sim卡号码 memcpy(vech_ID+7,IMSI_CODE+3,12); memcpy(vech_sim+8,JT808Conf_struct.Vechicle_Info.Vech_sim,12); lcd_fill(0); lcd_text12(0,3,(char *)vech_ID,19,LCD_MODE_SET); lcd_text12(0,18,(char *)vech_sim,20,LCD_MODE_SET); lcd_update_all(); break; default: break; } }
static void display( void ) { invert++; invert %= 2; lcd_fill( 0 ); if( row > 1 ) /*设置完成*/ { strcpy( jt808_param.id_0xF00A, car_type1[row0_selected] ); strcat( jt808_param.id_0xF00A, car_type2[col] ); param_save( 1 ); lcd_text12( 13, 16, "车辆类型设置完成", 16, LCD_MODE_SET ); }else { lcd_text12( 20, 4, car_type1[0], 4, LCD_MODE_SET ); lcd_text12( 44, 4, car_type1[1], 4, LCD_MODE_SET ); lcd_text12( 68, 4, car_type1[2], 4, LCD_MODE_SET ); lcd_text12( 92, 4, car_type1[3], 4, LCD_MODE_SET ); lcd_text12( 20, 18, car_type2[0], 4, LCD_MODE_SET ); lcd_text12( 44, 18, car_type2[1], 4, LCD_MODE_SET ); lcd_text12( 68, 18, car_type2[2], 4, LCD_MODE_SET ); lcd_text12( 92, 18, car_type2[3], 4, LCD_MODE_SET ); if( row == 0 ) /*操作第一行*/ { lcd_text12( 20 + col * 24, 4, car_type1[col], 4, invert * 2 + 1 ); /*闪烁 1 set 3 invert*/ }else if( row == 1 ) { lcd_text12( 20 + row0_selected * 24, 4, car_type1[row0_selected], 4, LCD_MODE_INVERT ); lcd_text12( 20 + col * 24, 18, car_type2[col], 4, invert * 2 + 1 ); /*闪烁 1 set 3 invert*/ } } lcd_update_all( ); }
static void timetick(unsigned int systick) { CounterBack++; if(BD_ZJ.flag_send ==result_success) { lcd_fill(0); lcd_text12(10,5,"波束状况 ",10,LCD_MODE_SET); BD1_control.BD_Signal=BD1_control.BD_Signal+'0'; lcd_text12(84,5,(char*)(&(BD1_control.BD_Signal)),1,LCD_MODE_SET); lcd_text12(10,19,"信号强度 ",10,LCD_MODE_SET); if(((BD1_control.BD_Signal-'0')>0)&&(BD1_control.BD_Signal-'0')<=2) lcd_text12(84,19,"较差",4,LCD_MODE_SET); if(((BD1_control.BD_Signal-'0')>2)&&(BD1_control.BD_Signal-'0')<=4) lcd_text12(84,19,"良好",4,LCD_MODE_SET); if(((BD1_control.BD_Signal-'0')>4)&&(BD1_control.BD_Signal-'0')<=6) lcd_text12(84,19,"优",2,LCD_MODE_SET); if(((BD1_control.BD_Signal-'0')==0)) { lcd_text12(84,19,"无信号",6,LCD_MODE_SET); } lcd_update_all(); BD_ZJ.flag_send=0; } if(CounterBack!=MaxBankIdleTime) return; pMenuItem=&Menu_1_Idle; pMenuItem->show(); CounterBack=0; }
static void Dis_DriverInfor(unsigned char type,unsigned char disscreen) { lcd_fill(0); if(type==1) { if(disscreen==1) { lcd_text12(0, 3,"1.驾驶员信息查看",16,LCD_MODE_INVERT); lcd_text12(0,19,"2.驾驶员信息发送",16,LCD_MODE_SET); } else if(disscreen==2) { lcd_text12(0, 3,"1.驾驶员信息查看",16,LCD_MODE_SET); lcd_text12(0,19,"2.驾驶员信息发送",16,LCD_MODE_INVERT); } } else if(type==2) { if(disscreen==1) lcd_text12(0,10,"按确认发送驾驶员信息",20,LCD_MODE_SET); else if(disscreen==2) lcd_text12(5,10,"驾驶员信息发送成功",18,LCD_MODE_SET); } lcd_update_all(); }
/****************************************************************************** * 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]; //Dis_date[22]={"2000/00/00 00:00:00"}; 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],strlen(number[Screen]),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])*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 }
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 keypress(unsigned int key) { switch(KeyValue) { case KeyValueMenu: pMenuItem=&Menu_9_Urgent;//scr_CarMulTrans; pMenuItem->show(); CounterBack=0; break; case KeyValueOk: BD1_Tx(BD1_TYPE_XTZJ,0,2); lcd_fill(0); lcd_text12(4,4,"系统检测指令已发出",18,LCD_MODE_SET); lcd_update_all(); //SD_ACKflag.f_Worklist_SD_0701H=1;//按键选择发送电子运单标志 /* 这里添加发送系统检测的标志 */ break; case KeyValueUP: break; case KeyValueDown: break; } KeyValue=0; }
/* ������ԥ���� ������³������� ����ʽ����¼���������ش����� */ void license_input(unsigned char par) { lcd_fill(0); switch(par) { case 1: lcd_text12(0,20,"������ԥ���ɺ���",20,LCD_MODE_SET); break; case 2: lcd_text12(0,20,"��³������Ӷ���ʽ�",20,LCD_MODE_SET); break; case 3: lcd_text12(0,20,"���¼���������ش���",20,LCD_MODE_SET); break; case 4: lcd_text12(0,20,"��",2,LCD_MODE_SET); break; case 5: lcd_text12(0,20,"0123456789ABCDEFGHIJ",20,LCD_MODE_SET); break; case 6: lcd_text12(0,20,"KLMNOPQRSTUVWXYZ",16,LCD_MODE_SET); break; default: break; } lcd_update_all(); }
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(); } } }
static void show(void) { //MenuIdle_working=0;//clear lcd_fill(0); lcd_text12(20, 10,"SIM¿¨Ç··Ñ",9, LCD_MODE_SET); lcd_update_all(); }
static void show(void) { lcd_fill(0); lcd_text12(0,2,"按确认键发系统自检",18,LCD_MODE_SET); lcd_text12(0,18,"指令",4,LCD_MODE_SET); lcd_update_all(); }
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(); }
static void show(void) { lcd_fill(0); lcd_text12(20,3,"您有一条新消息",14,LCD_MODE_SET); lcd_text12(26,19,"按确认键查看",12,LCD_MODE_SET); lcd_update_all(); }
static void timetick(unsigned int systick) { //u8 Reg_buf[22]; if(deviceID_set_num==10) { deviceID_set_num=0; pMenuItem=&Menu_0_11_deviceID; pMenuItem->show(); } else 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)//50ms一次,,60s { reset_firstset++; 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(Warn_Status[1]&0x01) { BuzzerFlag=11; lcd_fill(0); lcd_text12(30,10,"主电源掉电",10,LCD_MODE_SET); lcd_update_all(); } //循环显示待机界面 tickcount++; if(tickcount>=16) { tickcount=0; Disp_Idle(); } } Cent_To_Disp(); }
/* invert_last==0 ����ѡ�� invert_last==1 ����Ҫ�ĵ��ַ������·�ѡ��Ҫ���ַ�������ʾ���� invert_last==2 ��Ҫ�ĵ��ַ�ѡ�� */ void License_Type_Sel( u8 type1_2,u8 par,u8 invert_last) { lcd_fill(0); lcd_text12(0,0,(char *)Menu_Car_license,License_SetFlag-1,LCD_MODE_SET); if(invert_last==1) { if(License_SetFlag_temp>3) lcd_text12(0+(License_SetFlag_temp-2)*6,0,(char *)&Menu_Car_license[License_SetFlag_temp-2],1,LCD_MODE_INVERT); else if(License_SetFlag_temp==3)//��ɫ��ʾ���� lcd_text12(0,0,(char *)&Menu_Car_license[0],2,LCD_MODE_INVERT); } else { if(invert_last==2) { if(License_SetFlag_temp>3) lcd_text12(0+(License_SetFlag_temp-2)*6,0,(char *)&Menu_Car_license[License_SetFlag_temp-2],1,LCD_MODE_INVERT); else if(License_SetFlag_temp==3)//��ɫ��ʾ���� lcd_text12(0,0,(char *)&Menu_Car_license[0],2,LCD_MODE_INVERT); } if(type1_2==1) { if(par<20) { lcd_bitmap(par*width_zf, 14, &BMP_select_License, LCD_MODE_SET); lcd_text12(0,19,"0123456789ABCDEFGHIJ",20,LCD_MODE_SET); } else { lcd_bitmap((par-20)*width_zf, 14, &BMP_select_License, LCD_MODE_SET); lcd_text12(0,19,"KLMNOPQRSTUVWXYZ",16,LCD_MODE_SET); } } else if(type1_2==0) { if(License_Type_Counter<=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_Type_Counter>=10)&&(License_Type_Counter<=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_Type_Counter>=20)&&(License_Type_Counter<=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_Type_Counter==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(); }
static void show(void) { MenuIdle_working=0;//clear lcd_fill(0); lcd_text12(24, 10,"按确认键打印",12, 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 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) { concuss_step=JT808Conf_struct.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(); }
/* fill buffer and LCD with pattern */ void lcd_fill(const unsigned char pattern) { unsigned char page, col; for (page=0; page<LCD_Y_BYTES; page++) { for (col=0; col<LCD_X_BYTES; col++) l_display_array[page][col]=pattern; } 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 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) { 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 }
void lcd_fill_Page(const unsigned char pattern,unsigned char startpage,unsigned char endpage) { unsigned char page, col; for (page=startpage; page<endpage; page++) { for (col=0; col<LCD_X_BYTES; col++) l_display_array[page][col]=pattern; } lcd_update_all(); }
static void show(void) { u8 datatime_str[6]; u8 illegal_driveNum=0; u32 current_u32time=0; // 当前的时间 u32 old2day_u32time=0; // 前2个日历天的时间 current-2x86400 (172800) u32 read_u32time=0; u8 read_flag=0; // 是否需要读取 u8 show_state=0; u8 i=0, readusefull_num=0,read_index=0; MenuIdle_working=0;//clear //0. caculate time seconds Time2BCD(datatime_str); current_u32time=Time_sec_u32(datatime_str,6); old2day_u32time=current_u32time-172800; // 2个日历天内的时间 // 1. flag state if(Vdr_Wr_Rd_Offset.V_11H_Write>=1) //没存满 { get_indexnum=Vdr_Wr_Rd_Offset.V_11H_Write-1; read_flag=1; } else if(Vdr_Wr_Rd_Offset.V_11H_full==1) { get_indexnum=0;read_flag=1;} else get_indexnum=0; // 2. read if(read_flag) { if(get_11h(get_indexnum, H11_reg)==0) //50 packetsize num=100 show_state=0; read_u32time=Time_sec_u32(H11_reg+18,6); if(read_u32time>=old2day_u32time) { show_state=1; } } // 1. if(show_state) { Dis_num=0; Dis_status[0]=Dis_num+1+'0'; disp_record_11h(Dis_num); } else { Dis_num=0; lcd_fill(0); lcd_text12(18,10,"无超时驾驶记录",14,LCD_MODE_SET); lcd_update_all(); } //读疲劳驾驶记录 }
/****************************************************************************** * Function: Read_save_data () * DESCRIPTION: - 读取存储数据 * Input: str存储电文内容 input第几条的电文 length电文长度 * Input: mode 显示模式 * Output: * Returns: * * ----------------------------------- * Created By wxg 16-jan-2014 * ------------------------------- ******************************************************************************/ u8 Read_save_data(u8*str,u8 input,u8 mode) { #if 1 u8 temp[10]; u8 data[256];//自己定义的存储格式 u16 Addre_offset=0;//存储的偏移地址 u8 data_len =0;// memset(temp,0,10); memset(data,0,256); memset(str,0,210);//纯信息内容 Addre_offset =Sort_ID(DF_BD_data_rx, Addre_offset,input); rt_kprintf("Addre_offset--%d\r\n",Addre_offset); if(Addre_offset==RT_ERROR) { lcd_fill(0); lcd_text12(0,10,"无内容可显示...",15,LCD_MODE_SET); lcd_update_all(); return RT_ERROR; } //首先读出个数和长度的数据 DF_ReadFlash(DF_BD_data_rx,Addre_offset,temp,5); //根据长度再读出真实的数据 DF_ReadFlash(DF_BD_data_rx,Addre_offset,data,temp[4]); //这是自己定义的格式17,和18存储着接收电文的长度信息//接收的存储长度除以8 data_len = ((data[17]<<8) +data[18])/8; rt_kprintf("du chu shu ju len-- %d\r\n",temp[4]); OutPrint_HEX("Read", data,temp[4]); //length =data_len; //data_len=data_len/8; if(data[11]==0x60)//如果是混发的话 { memcpy(str,data+20,data_len-1); index_txt(str,data_len-1); OutPrint_HEX("Read DATA ", str,data_len); OutPrint_HEX("index_addre",index_addre,12); OutPrint_HEX("index_len",index_len,12); } else { //数组拷贝到这个str数组 memcpy(str,data+19,data_len); index_txt(str,data_len); OutPrint_HEX("Read DATA1 ", str,data_len); OutPrint_HEX("index_addre",index_addre,12); OutPrint_HEX("index_len",index_len,12); } //从电文长度中 First_show(data ,input,mode); return data_len; #endif }
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(); }
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(); }
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(); }