/*-------------------------------------------------------------------------------------- * @file DrawLCDGUI.c * @author ZhangJing * @version base on stm32f0x * @date 2015.09.11 * @brief LCD GUI绘图 ---------------------------------------------------------------------------------------*/ #include "stm32f10x_gpio.h" #include "string.h" #include "TypeDefine.h" #include "USARTSetup.h" #include "font.h" #include "LCDSetup.h" #include "DrawLCDGUI.h" #include "History.h" #include "ADCSetup.h" #include "SystemAlarm.h" #include "FM31256.h" #include "lorawan.h" #include "FlashSetup.h" #include "Bubble_ADCSetup.h" #include "ControlSystem.h" LCDPictureType emDisplayPicture;//当前显示页,用来定位当前页,防止本页反复刷新 LCDPictureType emCurrentPicture;//当前所在页,确定现在是在哪一页,用来做页面选择 LCDPictureType emLockPassowrdPicture;//在进入锁定密码后保存将要进入的界面 LCDPictureType emLockPassowrdFailPicture;//在锁定失败密码后保存将要进入的界面 LCDPictureType emAlarmRecordPicture;//报警时要将现在在哪页记录下来 LCDPictureType emAlarmRememberPicture;//报警时记录报警界面 uint8_t modifyStep = 1;//通用修改步骤 extern uint16_t self_adaption_Pressure; //自适应压力值 extern uint16_t ces_cong; extern SpeakerWorkType speakerWorkStep;//蜂鸣器工作步骤CntlSystemStandby extern uint16_t send_cont; //数据发送次数 uint16_t Version_data = 1032;//版本存储 /******************************************************************************** * Function: Gui_DrawPoint * Object: 画一个点 * 输入: uint16_t x,uint16_t y,uint16_t Data * 输出: 无 * 备注: 根据XY坐标将Data画入LCD *********************************************************************************/ void Gui_DrawPoint( uint16_t x,uint16_t y,uint16_t Data ) { LCDSetXY(x,y); // LCDWriteData( Data >> 8 ); LCDWriteData( Data ); } //画线函数,使用Bresenham 画线算法 /******************************************************************************** * Function: Gui_DrawLine * Object: 画一条线 * 输入: uint16_t x0, uint16_t y0,uint16_t x1, uint16_t y1,uint16_t Color * 输出: 无 * 备注: 1、根据XY起始坐标画一条线 * 2、int dx, // difference in x's dy, // difference in y's dx2, // dx,dy * 2 dy2, x_inc, // amount in pixel space to move during drawing y_inc, // amount in pixel space to move during drawing error, // the discriminant i.e. error i.e. decision variable index; // used for looping *********************************************************************************/ void Gui_DrawLine( uint16_t x0, uint16_t y0,uint16_t x1, uint16_t y1,uint16_t Color ) { int dx, // difference in x's dy, // difference in y's dx2, // dx,dy * 2 dy2, x_inc, // amount in pixel space to move during drawing y_inc, // amount in pixel space to move during drawing error, // the discriminant i.e. error i.e. decision variable index; // used for looping LCDSetXY( x0,y0 ); dx = x1 - x0;//计算x距离 dy = y1 - y0;//计算y距离 if ( dx >= 0 ) { x_inc = 1; } else { x_inc = -1; dx = -dx; } if ( dy >= 0 ) { y_inc = 1; } else { y_inc = -1; dy = -dy; } dx2 = dx << 1; dy2 = dy << 1; if ( dx > dy )//x距离大于y距离,那么每个x轴上只有一个点,每个y轴上有若干个点 { //且线的点数等于x距离,以x轴递增画点 // initialize error term error = dy2 - dx; // draw the line for ( index = 0; index <= dx; index++ )//要画的点数不会超过x距离 { //画点 Gui_DrawPoint( x0,y0,Color ); // test if error has overflowed if ( error >= 0 ) //是否需要增加y坐标值 { error -= dx2; // move to next line y0 += y_inc;//增加y坐标值 } // end if error overflowed // adjust the error term error+=dy2; // move to the next pixel x0+=x_inc;//x坐标值每次画点后都递增1 } // end for } // end if |slope| <= 1 else//y轴大于x轴,则每个y轴上只有一个点,x轴若干个点 { //以y轴为递增画点 // initialize error term error = dx2 - dy; // draw the line for (index=0; index <= dy; index++) { // set the pixel Gui_DrawPoint(x0,y0,Color); // test if error overflowed if (error >= 0) { error-=dy2; // move to next line x0+=x_inc; } // end if error overflowed // adjust the error term error+=dx2; // move to the next pixel y0+=y_inc; } // end for } // end else |slope| > 1 } /******************************************************************************** * Function: Gui_DrawFont_GBK8 * Object: 写字号为8字符的函数 * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s * 输出: 无 * 备注: 根据XY坐标将所需字符按8号字大小写在LCD上 *********************************************************************************/ void Gui_DrawFont_GBK8( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s ) { unsigned short k,x0; x0 = x; while( *s ) { if( ( *s ) < 128 ) { k = *s; if ( k == 13 ) { x = x0; //y += 16; } else { for ( k = 0;k < asc12_num;k++ ) { if ( asc8[k].Index[0] == *( s )) { DisplayGraphicsGBK8_8( x , y , (uint8_t *)asc8[k].Msk ); break; } } } // x -= 5;//反向显示 x += 5;//正向显示 } s++; } } /******************************************************************************** * Function: Gui_DrawFont_GBK8Number * Object: 写字号为8数字的函数 * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s * 输出: 无 * 备注: 根据XY坐标将所需数字按8号字大小写在LCD上 *********************************************************************************/ void Gui_DrawFont_GBK8Number( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s ) { unsigned short k,x0; x0 = x; while( *s ) { if( ( *s ) < 128 ) { k = *s; if ( k == 13 ) { x = x0; //y += 16; } else { for ( k = 0;k < asc12_num;k++ ) { if ( asc8[k].Index[0] == *( s )) { DisplayGraphicsGBK8_8( x , y , (uint8_t *)asc8[k].Msk ); break; } } } // x -= 5;//反向显示 x += 6;//正向显示 } s++; } } /******************************************************************************** * Function: Gui_DrawFont_GBK12 * Object: 写字号为12字符的函数 * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s * 输出: 无 * 备注: 根据XY坐标将所需字符按12号字大小写在LCD上 *********************************************************************************/ void Gui_DrawFont_GBK12( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s ) { unsigned short k,x0; x0 = x; while( *s ) { if( ( *s ) < 128 ) { k = *s; if ( k == 13 ) { x = x0; //y += 16; } else { for ( k = 0;k < asc12_num;k++ ) { if ( asc12[k].Index[0] == *( s )) { DisplayGraphicsGBK8_12( x , y , (uint8_t *)asc12[k].Msk ); break; } } } s++; // x -= 6;//反向显示 x += 6;//正向显示 } else { for ( k = 0;k < hz12_num;k++ ) { if (( hz12[k].Index[0] == *( s )) && ( hz12[k].Index[1] == *( s + 1 ))) { DisplayGraphicsGBK12( x,y,(uint8_t *)hz12[k].Msk ); break; } } s += 2; // x -= 12;//反向显示 x += 12;//正向显示 } } } /******************************************************************************** * Function: Gui_DrawFont_GBK16 * Object: 写字号为16字符的函数 * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s * 输出: 无 * 备注: 根据XY坐标将所需字符按16号字大小写在LCD上 *********************************************************************************/ void Gui_DrawFont_GBK16( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s ) { unsigned short k,x0; x0 = x; while( *s ) { if( ( *s ) < 128 ) { k = *s; if ( k == 13 ) { x = x0; y += 16; } else { for ( k = 0;k < asc16_num;k++ ) { if ( asc16[k].Index[0] == *( s )) { DisplayGraphicsGBK8_16( x , y , (uint8_t *)asc16[k].Msk ); break; } } } s++; // x -= 8;//反向显示 x += 8;//正向显示 } else { for ( k = 0;k < hz16_num;k++ ) { if (( hz16[k].Index[0] == *( s )) && ( hz16[k].Index[1] == *( s + 1 ))) { DisplayGraphicsGBK16( x,y,(uint8_t *)hz16[k].Msk ); break; } } s += 2; // x -= 16;//反向显示 x += 16;//正向显示 } } } /******************************************************************************** * Function: Gui_DrawFont_GBK24 * Object: 写字号为24字符的函数 * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s * 输出: 无 * 备注: 根据XY坐标将所需字符按24号字大小写在LCD上 *********************************************************************************/ void Gui_DrawFont_GBK24( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s ) { unsigned short k; while( *s ) { if( *s < 0x80 ) { k = *s; if( k > 32 ) { k -= 32; } else { k = 0; } //DisplayGraphicsGBK8( x,y,(uint8_t *)asc16[ k * 16 ]); s++; x += 8; } else { for ( k = 0;k < hz24_num;k++ ) { if (( hz24[k].Index[0] == *( s )) && ( hz24[k].Index[1] == *( s + 1 )))//用汉字的ASCII码进行查找符合条件的汉字 { DisplayGraphicsGBK24( x,y,(uint8_t *)hz24[k].Msk ); } } s += 2; x -= 24;//反向显示 // x += 24;//正向显示 } } } /************************************************************************************* * Function: HexToASCII * Object: 将十六进制的数转换为ASCII码 * 输入: uint32_t data * uint8_t* returnData 以字节形式返回ASCII * 输出: * 备注: uint8_t tempData = 0;临时变量 **************************************************************************************/ void HexToASCII( uint8_t data , uint8_t* returnData ) { uint8_t tempData = 0; tempData = (uint8_t)( ( data & 0xf0 ) >> 4 );//高4位转换 if( tempData > 0 && tempData <= 9 ) { tempData = 0x30 + tempData; } else if( tempData >= 0x0a && tempData <= 0x0f ) { tempData = 0x41 + tempData - 10; } else { tempData = 0x30; } *returnData = tempData; returnData++; tempData = (uint8_t)( data & 0x0f );//低4位转换 if( tempData > 0 && tempData <= 9 ) { tempData = 0x30 + tempData; } else if( tempData >= 0x0a && tempData <= 0x0f ) { tempData = 0x41 + tempData - 10; } else { tempData =0x30; } *returnData = tempData; } /************************************************************************************* * Function: DecimalToASCII * Object: 将十进制的数转换为ASCII码 * 输入: uint32_t data * uint8_t* returnData 以字节形式返回ASCII * uint8_t decQty 十进制数位数 * 输出: * 备注: 最多可以转换10位十进制数 **************************************************************************************/ void DecimalToASCII( uint64_t data,uint8_t* returnData,uint8_t decQty ) { switch( decQty ) { case 1: returnData[0] = (uint8_t)(data + 0x30); returnData[1] = 0; returnData[2] = 0; returnData[3] = 0; returnData[4] = 0; returnData[5] = 0; returnData[6] = 0; returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 2: returnData[0] = (uint8_t)(data / 10 + 0x30); returnData[1] = (uint8_t)(data % 10 + 0x30); returnData[2] = 0; returnData[3] = 0; returnData[4] = 0; returnData[5] = 0; returnData[6] = 0; returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 3: returnData[0] = (uint8_t)(data / 100 + 0x30); returnData[1] = (uint8_t)(data % 100 / 10 + 0x30); returnData[2] = (uint8_t)(data % 10 + 0x30); returnData[3] = 0; returnData[4] = 0; returnData[5] = 0; returnData[6] = 0; returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 4: returnData[0] = (uint8_t)(data / 1000 + 0x30); returnData[1] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[2] = (uint8_t)(data % 100 / 10 + 0x30); returnData[3] = (uint8_t)(data % 10 + 0x30); returnData[4] = 0; returnData[5] = 0; returnData[6] = 0; returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 5: returnData[0] = (uint8_t)(data / 10000 + 0x30); returnData[1] = (uint8_t)(data % 10000 / 1000 + 0x30); returnData[2] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[3] = (uint8_t)(data % 100 / 10 + 0x30); returnData[4] = (uint8_t)(data % 10 + 0x30); returnData[5] = 0; returnData[6] = 0; returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 6: returnData[0] = (uint8_t)(data / 100000 + 0x30); returnData[1] = (uint8_t)(data % 100000 / 10000 + 0x30); returnData[2] = (uint8_t)(data % 10000 / 1000 + 0x30); returnData[3] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[4] = (uint8_t)(data % 100 / 10 + 0x30); returnData[5] = (uint8_t)(data % 10 + 0x30); returnData[6] = 0; returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 7: returnData[0] = (uint8_t)(data / 1000000 + 0x30); returnData[1] = (uint8_t)(data % 1000000 / 100000 + 0x30); returnData[2] = (uint8_t)(data % 100000 / 10000 + 0x30); returnData[3] = (uint8_t)(data % 10000 / 1000 + 0x30); returnData[4] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[5] = (uint8_t)(data % 100 / 10 + 0x30); returnData[6] = (uint8_t)(data % 10 + 0x30); returnData[7] = 0; returnData[8] = 0; returnData[9] = 0; break; case 8: returnData[0] = (uint8_t)(data / 10000000 + 0x30); returnData[1] = (uint8_t)(data % 10000000 / 1000000 + 0x30); returnData[2] = (uint8_t)(data % 1000000 / 100000 + 0x30); returnData[3] = (uint8_t)(data % 100000 / 10000 + 0x30); returnData[4] = (uint8_t)(data % 10000 / 1000 + 0x30); returnData[5] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[6] = (uint8_t)(data % 100 / 10 + 0x30); returnData[7] = (uint8_t)(data % 10 + 0x30); returnData[8] = 0; returnData[9] = 0; break; case 9: returnData[0] = (uint8_t)(data / 100000000 + 0x30); returnData[1] = (uint8_t)(data % 100000000 / 10000000 + 0x30); returnData[2] = (uint8_t)(data % 10000000 / 1000000 + 0x30); returnData[3] = (uint8_t)(data % 1000000 / 100000 + 0x30); returnData[4] = (uint8_t)(data % 100000 / 10000 + 0x30); returnData[5] = (uint8_t)(data % 10000 / 1000 + 0x30); returnData[6] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[7] = (uint8_t)(data % 100 / 10 + 0x30); returnData[8] = (uint8_t)(data % 10 + 0x30); returnData[9] = 0; break; case 10: returnData[0] = (uint8_t)(data / 1000000000 + 0x30); returnData[1] = (uint8_t)(data % 1000000000 / 100000000 + 0x30); returnData[2] = (uint8_t)(data % 100000000 / 10000000 + 0x30); returnData[3] = (uint8_t)(data % 10000000 / 1000000 + 0x30); returnData[4] = (uint8_t)(data % 1000000 / 100000 + 0x30); returnData[5] = (uint8_t)(data % 100000 / 10000 + 0x30); returnData[6] = (uint8_t)(data % 10000 / 1000 + 0x30); returnData[7] = (uint8_t)(data % 1000 / 100 + 0x30); returnData[8] = (uint8_t)(data % 100 / 10 + 0x30); returnData[9] = (uint8_t)(data % 10 + 0x30); break; default:break; } } /************************************************************************************* * Function: DrawPhoneDisplay * Object: 绘制呼叫电话标志 * 输入: 无 * 输出: 无 * 备注: 在有呼叫的情况下显示 **************************************************************************************/ void DrawPhoneDisplay( void ) { if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } } /************************************************************************************* * Function: DrawPauseDisplay * Object: 绘制暂停标志 * 输入: 无 * 输出: 无 * 备注: 在有呼叫的情况下显示 **************************************************************************************/ void DrawPauseDisplay( void ) { if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } } /************************************************************************************* * Function: DrawLockDisplay * Object: 绘制上锁标志 * 输入: 无 * 输出: 无 * 备注: 在有呼叫的情况下显示 **************************************************************************************/ void DrawLockDisplay( void ) { if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } } /************************************************************************************* * Function: DrawSignalDisplay * Object: 绘制信号显示 * 输入: 无 * 输出: 无 * 备注: 在有网络的情况下显示 **************************************************************************************/ void DrawSignalDisplay( void ) { // if( ( EngineeringModeValue.networkState == ENGINEERINGMODE_ON ) && ( TaskSchedulerFlag.zigbeeInNetFlag == TASK_FLAG_SET ) ) if( EngineeringModeValue.networkState == ENGINEERINGMODE_ON && TaskSchedulerFlag.NET_ONLINE_FLAG == TASK_FLAG_SET) //update by wulianwei { DisplayHeader(0xff,0xff,108);//信号 } else { DisplayHeader(0x00,0x00,108);//信号 } } /************************************************************************************* * Function: DrawSilenceDisplay * Object: 绘制静音显示 * 输入: 无 * 输出: 无 * 备注: 在有静音设置时显示 **************************************************************************************/ void DrawSilenceDisplay( void ) { if( ( EngineeringModeValue.silenceState == ENGINEERINGMODE_ON ) || ( TaskSchedulerFlag.silenceFlag == TASK_FLAG_SET )) { DisplayHeader(0xff,0xff,41);//静音 DisplayHeader(0xff,0xff,42);//静音 } else { DisplayHeader(0,0,41);//静音 DisplayHeader(0,0,42);//静音 } } /************************************************************************************* * Function: DrawSignalDisplay * Object: 绘电池显示 * 输入: 无 * 输出: 无 * 备注: 根据电池电量分出3个区,显示电池格数 **************************************************************************************/ void DrawBatteryDisplay( void ) { //2018/1/31 增加电池图标刷新标志 u8 BatteryBuf = 0; if((BatteryBuf != realTimeData.batteryVolt) && (TaskSchedulerFlag.batteryVoltHeaderFlag == TASK_FLAG_SET)) { BatteryBuf = realTimeData.batteryVolt; TaskSchedulerFlag.batteryVoltHeaderFlag = TASK_FLAG_CLEAR; } if( sysAlarmFlag.VoltLowest != ALARM_PREPARE ) { LCDPartClear( 119 , 131 , 8 , 1 ); if( realTimeData.batteryVolt < BATTERY_VOLT_LIMIT1 ) { DisplayHeader( 0x01,0x01,119 );//电池空 } else if( ( realTimeData.batteryVolt >= BATTERY_VOLT_LIMIT1 ) && ( realTimeData.batteryVolt < BATTERY_VOLT_LIMIT2 ) ) { DisplayHeader( 0x01,0x01,120 );//电池一格 } else if( ( realTimeData.batteryVolt >= BATTERY_VOLT_LIMIT2 ) && ( realTimeData.batteryVolt < BATTERY_VOLT_LIMIT3 ) ) { DisplayHeader( 0x01,0x01,121 );//电池两格 } else if( realTimeData.batteryVolt >= BATTERY_VOLT_LIMIT3 ) { DisplayHeader( 0x01,0x01,122 );//电池满格 } } } /************************************************************************************* * Function: DrawScheduleDisplay * Object: 运行过程中进度条更新循环 * 输入: 无 * 输出: 无 * 备注: 在有运行中的情况下循环显示,暂停显示 **************************************************************************************/ void DrawScheduleDisplay(void) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if(TaskSchedulerFlag.LcdLogoFlag == TASK_FLAG_SET) { if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } TaskSchedulerFlag.LcdLogoFlag = TASK_FLAG_CLEAR; } if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET ) { switch( modifyStep ) { case 1: DisplayHeader(0x00,0x00,8);//进度条 DisplayHeader(0xff,0xff,5);//进度条 modifyStep = 2; break; case 2: DisplayHeader(0xff,0xff,6);//进度条 modifyStep = 3; break; case 3: DisplayHeader(0xff,0xff,7);//进度条 modifyStep = 4; break; case 4: DisplayHeader(0xff,0xff,8);//进度条 modifyStep = 1; break; default:break; } TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR; } if(emSysWorkStep ==EnterRunMain) { if(TaskSchedulerFlag.lcdFlashFlag1 == TASK_FLAG_SET) { if(emCurrentPicture == RunPCADisp) { if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) { Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"无效次数" ); DecimalToASCII( realTimeData.invalidCount,tempBuf,3 ); } else { Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"有效次数" ); DecimalToASCII( realTimeData.validCount,tempBuf,3 ); } if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET)// { TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT; Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0," "); } else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR)) { TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR; Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0,tempBuf ); } } else if(emCurrentPicture == RunMainDisp) { if( EngineeringModeValue.pressure_switch == 1) //显示关闭的话,显示正常的参数 { if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) { Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"无效" ); DecimalToASCII( realTimeData.invalidCount,tempBuf,3 ); } else { Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"有效" ); DecimalToASCII( realTimeData.validCount,tempBuf,3 ); } if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET) { TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT; Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0," "); } else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )) { TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR; Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf ); } } } TaskSchedulerFlag.lcdFlashFlag1 = TASK_FLAG_CLEAR; } if(TaskSchedulerFlag.PCATimerFlashFlag1 == TASK_FLAG_SET) { if( ( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_SET ) )//锁时数值要闪烁 { TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_WAIT; Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0," "); } else if((( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_WSET )) ||(TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_CLEAR)) { TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_CLEAR; DecimalToASCII( realTimeData.lockTime,tempBuf,2 ); Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf ); } TaskSchedulerFlag.PCATimerFlashFlag1 = TASK_FLAG_CLEAR; } } } /************************************************************************************* * Function: DrawStartupPicture * Object: 绘制开机画面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawStartupPicture( void ) { LCDClear( GRAY0 ); // DrawBatteryDisplay();//电池 // DrawSignalDisplay();//信号 Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"改善医疗体验" );//(5,6) Gui_DrawFont_GBK16( 20,2,BLACK,GRAY0,"呵护生命健康" );//(25,2) } /************************************************************************************* * Function: DrawHistoryFirstPicture * Object: 绘制历史数据第一画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将tempInputDose转换成数组进行写操作 uint8_t tempReadIndex = 0;临时索引变量 uint16_t tempInputDose = 0; 临时变量计算所需显示的数字 **************************************************************************************/ void DrawHistoryFirstPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint8_t tempReadIndex = 0; uint16_t tempInputDose = 0; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,23);//历史数据 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"已输" ); tempInputDose = historyRecord.inputed / 10; DecimalToASCII( tempInputDose,tempBuf,3 ); Gui_DrawFont_GBK12( 30,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 48,7,BLACK,GRAY0,"." ); tempInputDose = historyRecord.inputed % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 54,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 63,7,BLACK,GRAY0,"ml" ); if( historyRecordQTY == 0 ) { tempReadIndex = 0; FackreadIndex = 0; } else { // tempReadIndex = historyRecord.readIndex + 1; tempReadIndex = FackreadIndex ; } DecimalToASCII( tempReadIndex,tempBuf,3 ); Gui_DrawFont_GBK12( 86,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,"/" ); DecimalToASCII( FackhistoryRecordQTY,tempBuf,3 ); Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"总量" ); DecimalToASCII( historyRecord.totalDose,tempBuf,3 ); Gui_DrawFont_GBK12( 31,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 51,5,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 64,5,BLACK,GRAY0,"首次量" ); DecimalToASCII( historyRecord.firstDose,tempBuf,2 ); Gui_DrawFont_GBK12( 102,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 119,5,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"持续" ); tempInputDose = historyRecord.continueDose / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 28,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 40,3,BLACK,GRAY0,"." ); tempInputDose = historyRecord.continueDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 45,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 51,3,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 64,3,BLACK,GRAY0,"追加" ); tempInputDose = historyRecord.superaddition / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 90,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 102,3,BLACK,GRAY0,"." ); tempInputDose = historyRecord.superaddition % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 107,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 119,3,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"锁时" ); DecimalToASCII( historyRecord.lockTime,tempBuf,2 ); Gui_DrawFont_GBK12( 30,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 45,1,BLACK,GRAY0,"min" ); Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,"极限值" );//57 DecimalToASCII( historyRecord.limitDose,tempBuf,3 ); Gui_DrawFont_GBK12( 100,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 119,1,BLACK,GRAY0,"ml" ); } /************************************************************************************* * Function: DrawHistorySecondPicture * Object: 绘制历史数据第二画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawHistorySecondPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,23);//历史数据 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"追加有效次数" ); DecimalToASCII( historyRecord.additionalNum1,tempBuf,3 ); Gui_DrawFont_GBK12( 82,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"追加无效次数" ); DecimalToASCII( historyRecord.additionalNum2,tempBuf,3 ); Gui_DrawFont_GBK12( 82,5,BLACK,GRAY0,tempBuf ); DecimalToASCII( historyRecord.stopTimeMonth,tempBuf,2 ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"月" ); DecimalToASCII( historyRecord.stopTimeDate,tempBuf,2 ); Gui_DrawFont_GBK12( 28,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,3,BLACK,GRAY0,"日" ); DecimalToASCII( historyRecord.stopTimeHour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,3,BLACK,GRAY0,":" ); DecimalToASCII( historyRecord.stopTimeMinute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"关机" ); /* Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"关机" );*/ // if( historyRecord.closeDeviceState == 1 ) // { // Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"输液结束" ); // } // else // { // Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"关机" ); // } DecimalToASCII( historyRecord.alarmTimeMonth,tempBuf,2 ); Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,"月" ); DecimalToASCII( historyRecord.alarmTimeDate,tempBuf,2 ); Gui_DrawFont_GBK12( 28,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,1,BLACK,GRAY0,"日" ); DecimalToASCII( historyRecord.alarmTimeHour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,":" ); DecimalToASCII( historyRecord.alarmTimeMinute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,1,BLACK,GRAY0,tempBuf ); switch( historyRecord.alarmType ) { case 1: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"机械故障" ); break; case 2: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"堵塞" ); break; case 3: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"极限" ); break; case 4: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"气泡无液" ); break; case 5: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"未装药盒" ); break; case 6: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"电量耗尽" ); break; case 7: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"管道脱落" ); break; case 8: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"输液结束" ); break; default: Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"无报警" ); break; } } /************************************************************************************* * Function: DrawDeviceIDPicture * Object: 绘制设备ID画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[2];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawDeviceIDPicture( void ) { uint8_t tempBuf[2] = { 0x30,0x30 }; uint8_t i; uint32_t dat_buf=0,decimals_data; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 6,6,BLACK,GRAY0,"ID:" ); for( i = 0 ; i < 8 ; i++ ) { HexToASCII( setParamInfo.deviceID[i],tempBuf ); Gui_DrawFont_GBK12( ( 30 + i * 12 ), 6, BLACK,GRAY0, tempBuf ); } Gui_DrawFont_GBK12( 6,3,BLACK,GRAY0,"总剩余量:" ); dat_buf=((150000-realTimeData.InputTotalDose)/10); if( (dat_buf /10000) != 0) { DecimalToASCII(dat_buf,tempBuf,5 ); Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 90,3,BLACK,GRAY0,"." ); decimals_data=((150000-realTimeData.InputTotalDose)%10); DecimalToASCII( decimals_data,tempBuf,1 ); Gui_DrawFont_GBK12( 94,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 100,3,BLACK,GRAY0,"ml" ); } else if( (dat_buf /1000) != 0) { DecimalToASCII(dat_buf,tempBuf,4 ); Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"." ); decimals_data=((150000-realTimeData.InputTotalDose)%10); DecimalToASCII( decimals_data,tempBuf,1 ); Gui_DrawFont_GBK12( 88,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 94,3,BLACK,GRAY0,"ml" ); } else if( (dat_buf /100) != 0) { DecimalToASCII(dat_buf,tempBuf,3 ); Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 78,3,BLACK,GRAY0,"." ); decimals_data=((150000-realTimeData.InputTotalDose)%10); DecimalToASCII( decimals_data,tempBuf,1 ); Gui_DrawFont_GBK12( 82,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 88,3,BLACK,GRAY0,"ml" ); } else if( (dat_buf /10) != 0) { DecimalToASCII(dat_buf,tempBuf,2 ); Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 72,3,BLACK,GRAY0,"." ); decimals_data=((150000-realTimeData.InputTotalDose)%10); DecimalToASCII( decimals_data,tempBuf,1 ); Gui_DrawFont_GBK12( 76,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 82,3,BLACK,GRAY0,"ml" ); } else { DecimalToASCII(dat_buf,tempBuf,1 ); Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 66,3,BLACK,GRAY0,"." ); decimals_data=((150000-realTimeData.InputTotalDose)%10); DecimalToASCII( decimals_data,tempBuf,1 ); Gui_DrawFont_GBK12( 70,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 76,3,BLACK,GRAY0,"ml" ); } Gui_DrawFont_GBK12( 6,1,BLACK,GRAY0,"版本:V" ); DecimalToASCII((Version_data/1000),tempBuf,1 ); Gui_DrawFont_GBK12( 48,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 54,1,BLACK,GRAY0,"." ); DecimalToASCII(((Version_data%1000)/100),tempBuf,1 ); Gui_DrawFont_GBK12( 60,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 66,1,BLACK,GRAY0,"." ); DecimalToASCII(((Version_data%100)/10),tempBuf,1 ); Gui_DrawFont_GBK12( 72,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 78,1,BLACK,GRAY0,"." ); DecimalToASCII((Version_data%10),tempBuf,1 ); Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf ); } /************************************************************************************* * Function: DrawTimeDispPicture * Object: 绘制时间显示画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawTimeDispPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,24);//时间 DecimalToASCII( displayTimeBuf.year,tempBuf,4 ); Gui_DrawFont_GBK16( 13,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 45,6,BLACK,GRAY0,"年" ); DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK16( 61,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 77,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK16( 93,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 109,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK16( 45,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 65,2,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK16( 77,2,BLACK,GRAY0,tempBuf ); emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DecimalToASCII( displayTimeBuf.year,tempBuf,4 ); Gui_DrawFont_GBK16( 13,6,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK16( 61,6,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK16( 93,6,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK16( 45,2,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK16( 77,2,BLACK,GRAY0,tempBuf ); } } /************************************************************************************* * Function: DrawTimeSetPicture * Object: 绘制时间设置画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawTimeSetPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,24);//时间 DisplayHeader(0xff,0xff,94);//扳手 Gui_DrawFont_GBK12( 5,7,BLACK,GRAY0,"时间确认" ); Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0,"----" ); DecimalToASCII( displayTimeBuf.year,tempBuf,4 ); Gui_DrawFont_GBK12( 13,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 45,5,BLACK,GRAY0,"年" ); DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 61,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 77,5,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 93,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 109,5,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 45,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 65,2,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 77,2,BLACK,GRAY0,tempBuf ); emPictureRunState = Update; } else //只更新数值 { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch( emSetTimeChoose) { case Year: DecimalToASCII( setTimeBuf.year,tempBuf,4 ); Gui_DrawFont_GBK12( 13,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0,"----" ); Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " ); break; case Month: DecimalToASCII( setTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 61,5,BLACK,GRAY0,tempBuf ); DecimalToASCII( setTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 93,5,BLACK,GRAY0,tempBuf );//在显示月的同时也显示日期 Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0,"--" ); Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " ); break; case Date: DecimalToASCII( setTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 93,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0,"--" ); Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " ); break; case Hour: DecimalToASCII( setTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 45,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0,"--" ); Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " ); break; case Minute: DecimalToASCII( setTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 77,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0,"--" ); break; default:break; } } } /************************************************************************************* * Function: DrawPasswordSetPicture * Object: 绘制密码设置画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawPasswordSetPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint8_t i; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,92);//锁1 Gui_DrawFont_GBK12( 25,5,BLACK,GRAY0,"设置密码" ); Gui_DrawFont_GBK8( 78,4,BLACK,GRAY0,"_" ); for( i = 0 ; i < 3 ; i++ ) { DecimalToASCII( setPasswordBuf[i],tempBuf,1 ); Gui_DrawFont_GBK8( 78 + i * 8,5,BLACK,GRAY0, tempBuf); } Gui_DrawFont_GBK12( 25,2,BLACK,GRAY0,"确认密码" ); for( i = 0 ; i < 3 ; i++ ) { DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 ); Gui_DrawFont_GBK8( 78 + i * 8,2,BLACK,GRAY0, tempBuf); } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch(modifyStep) { case 1: Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " ); break; case 2: Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " ); break; case 3: Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " ); break; case 4: Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " ); break; case 5: Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " ); break; case 6: Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0,"_" ); break; default:break; } for( i = 0 ; i < 3 ; i++ ) { DecimalToASCII( setPasswordBuf[i],tempBuf,1 ); Gui_DrawFont_GBK8( 78 + i * 8,5,BLACK,GRAY0, tempBuf); } for( i = 0 ; i < 3 ; i++ ) { DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 ); Gui_DrawFont_GBK8( 78 + i * 8,2,BLACK,GRAY0, tempBuf); } } } /************************************************************************************* * Function: DrawVerifyInfoPicture * Object: 绘制确认病人信息画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawVerifyInfoPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint8_t tempIndex = 0; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"请确认信息" ); Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"住院号" ); DecimalToASCII( verifyInfo.hospitalNO,tempBuf,EngineeringModeValue.hospitalNOQty ); Gui_DrawFont_GBK12( 46,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,2,BLACK,GRAY0,"病区" ); Gui_DrawFont_GBK12( 28,2,BLACK,GRAY0,"--" ); Gui_DrawFont_GBK12( 40,2,BLACK,GRAY0,"床号" ); DecimalToASCII( verifyInfo.sickroom,tempBuf,EngineeringModeValue.sickroomQty ); Gui_DrawFont_GBK12( 64,2,BLACK,GRAY0,tempBuf ); tempIndex = 64 + EngineeringModeValue.sickroomQty * 6; Gui_DrawFont_GBK12( tempIndex,2,BLACK,GRAY0,"--" ); tempIndex += 12; DecimalToASCII( verifyInfo.bedNO,tempBuf,EngineeringModeValue.bedNOQty ); Gui_DrawFont_GBK12( tempIndex,2,BLACK,GRAY0,tempBuf ); if( verifyInfo.modifyInfoType == HOSPITALNO_SELECTED ) { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"<==" ); Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0," " ); } else { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0,"<==" ); } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 if( verifyInfo.modifyInfoType == HOSPITALNO_SELECTED ) { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"<==" ); Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0," " ); } else if( verifyInfo.modifyInfoType == BEDNO_SELECTED ) { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0,"<==" ); } } } /************************************************************************************* * Function: DrawSetVerifyInfoPicture * Object: 绘制设置确认病人信息画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint8_t tempIndex = 0;临时索引变量 **************************************************************************************/ void DrawSetVerifyInfoPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint8_t tempIndex = 0; uint8_t i; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,94);//扳手 if( verifyInfo.modifyInfoType == HOSPITALNO_SELECTED ) { Gui_DrawFont_GBK8Number( 56,3,BLACK,GRAY0,"-" ); } else if( verifyInfo.modifyInfoType == BEDNO_SELECTED ) { Gui_DrawFont_GBK8Number( 76,1,BLACK,GRAY0,"-" ); } Gui_DrawFont_GBK12( 10,7,BLACK,GRAY0,"请确认信息" ); Gui_DrawFont_GBK12( 10,4,BLACK,GRAY0,"住院号" ); for( i = 0 ; i < EngineeringModeValue.hospitalNOQty ; i++ ) { DecimalToASCII( setParamInfo.hospitalNO[i],tempBuf,1 ); Gui_DrawFont_GBK8Number( 56 + i * 6,4,BLACK,GRAY0,tempBuf ); } Gui_DrawFont_GBK12( 10,2,BLACK,GRAY0,"病区" ); Gui_DrawFont_GBK12( 34,2,BLACK,GRAY0,"--" ); Gui_DrawFont_GBK12( 46,2,BLACK,GRAY0,"床号" ); for( i = 0 ; i < EngineeringModeValue.sickroomQty ; i++ ) { DecimalToASCII( setParamInfo.sickroom[i],tempBuf,1 ); Gui_DrawFont_GBK8Number( 76 + i * 6,2,BLACK,GRAY0,tempBuf ); } tempIndex = 76 + EngineeringModeValue.sickroomQty * 6; Gui_DrawFont_GBK8Number( tempIndex,2,BLACK,GRAY0,"--" ); tempIndex += 12; for( i = 0 ; i < EngineeringModeValue.bedNOQty ; i++ ) { DecimalToASCII( setParamInfo.bedNO[i],tempBuf,1 ); Gui_DrawFont_GBK8Number( tempIndex + i * 6,2,BLACK,GRAY0,tempBuf ); } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch( verifyInfo.modifyInfoType ) { case HOSPITALNO_SELECTED: for( i = 0 ; i < EngineeringModeValue.hospitalNOQty ; i++ ) { Gui_DrawFont_GBK8Number( 56 + i * 6,3,BLACK,GRAY0," " ); DecimalToASCII( setParamInfo.hospitalNO[i],tempBuf,1 ); Gui_DrawFont_GBK8Number( 56 + i * 6,4,BLACK,GRAY0,tempBuf ); } switch(modifyStep) { case 1: Gui_DrawFont_GBK8Number( 56 + ( 1 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 2: Gui_DrawFont_GBK8Number( 56 + ( 2 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 3: Gui_DrawFont_GBK8Number( 56 + ( 3 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 4: Gui_DrawFont_GBK8Number( 56 + ( 4 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 5: Gui_DrawFont_GBK8Number( 56 + ( 5 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 6: Gui_DrawFont_GBK8Number( 56 + ( 6 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 7: Gui_DrawFont_GBK8Number( 56 + ( 7 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 8: Gui_DrawFont_GBK8Number( 56 + ( 8 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 9: Gui_DrawFont_GBK8Number( 56 + ( 9 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; case 10: Gui_DrawFont_GBK8( 56 + ( 10 - 1 ) * 6,3,BLACK,GRAY0,"-" ); break; default:break; } break; case BEDNO_SELECTED: for( i = 0 ; i < EngineeringModeValue.sickroomQty ; i++ )//病区 { DecimalToASCII( setParamInfo.sickroom[i],tempBuf,1 ); Gui_DrawFont_GBK8Number( 76 + i * 6,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 76 + i * 6,1,BLACK,GRAY0," " ); if( i == ( modifyStep - 1 ) )//判断操作的是否是当前位 { Gui_DrawFont_GBK8Number( 76 + i * 6,1,BLACK,GRAY0,"-" ); } else { Gui_DrawFont_GBK8Number( 76 + i * 6,1,BLACK,GRAY0," " ); } } // switch( modifyStep )//判断操作的是否是当前位 // { // case 1: // Gui_DrawFont_GBK8Number( 76 + ( 1 - 1 ) * 6,1,BLACK,GRAY0,"-" ); // break; // case 2: // Gui_DrawFont_GBK8Number( 76 + ( 2 - 1 ) * 6,1,BLACK,GRAY0,"-" ); // break; // case 3: // Gui_DrawFont_GBK8Number( 76 + ( 3 - 1 ) * 6,1,BLACK,GRAY0,"-" ); // break; // default:break; // } tempIndex = 76 + EngineeringModeValue.sickroomQty * 6; Gui_DrawFont_GBK8Number( tempIndex,2,BLACK,GRAY0,"--" ); tempIndex += 12; for( i = 0 ; i < EngineeringModeValue.bedNOQty ; i++ )//病床 { Gui_DrawFont_GBK8Number( tempIndex + i * 6,1,BLACK,GRAY0," " ); DecimalToASCII( setParamInfo.bedNO[i],tempBuf,1 ); Gui_DrawFont_GBK8Number( tempIndex + i * 6,2,BLACK,GRAY0,tempBuf ); if( ( i + EngineeringModeValue.sickroomQty ) == ( modifyStep - 1 ) ) { Gui_DrawFont_GBK8Number( tempIndex + i * 6,1,BLACK,GRAY0,"-" ); } else { Gui_DrawFont_GBK8Number( tempIndex + i * 6,1,BLACK,GRAY0," " ); } } // switch( modifyStep ) // { // case 4: // Gui_DrawFont_GBK8Number( tempIndex + ( 1 - 1 ) * 6,1,BLACK,GRAY0,"-" ); // break; // case 5: // Gui_DrawFont_GBK8Number( tempIndex + ( 2 - 1 ) * 6,1,BLACK,GRAY0,"-" ); // break; // case 6: // Gui_DrawFont_GBK8Number( tempIndex + ( 3 - 1 ) * 6,1,BLACK,GRAY0,"-" ); // break; // default:break; // } break; default:break; } } } /************************************************************************************* * Function: DrawNoInpatientPicture * Object: 绘制未设置住院号提醒界面 * 输入: 无 * 输出: 无 * 备注: 未设置住院号不能进入参数设置界面,按返回按键回到设置住院号界面 **************************************************************************************/ void DrawNoInpatientPicture(void) { LCDClear( GRAY0 ); Gui_DrawFont_GBK12( 25,4,BLACK,GRAY0,"请设置住院号!" ); } /************************************************************************************* * Function: DrawAiroutPicture * Object: 绘制排气信息画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint16_t tempData = 0;临时计算变量 **************************************************************************************/ void DrawAiroutPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint16_t tempData = 0; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,6);//进度条1 Gui_DrawFont_GBK16( 44,5,BLACK,GRAY0,"排 气" ); if( realTimeData.airoutValue>=999) realTimeData.airoutValue =999;//限制排气最大值为100ml tempData = realTimeData.airoutValue / 10; DecimalToASCII( tempData,tempBuf,2 ); Gui_DrawFont_GBK16( 44,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 60,2,BLACK,GRAY0,"." ); tempData = realTimeData.airoutValue % 10; DecimalToASCII( tempData,tempBuf,1 ); Gui_DrawFont_GBK16( 68,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 78,2,BLACK,GRAY0,"ml" ); emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,5);//进度条1 if( realTimeData.airoutValue>=999) realTimeData.airoutValue =999;//限制排气最大值为100ml tempData = realTimeData.airoutValue / 10; DecimalToASCII( tempData,tempBuf,2 ); Gui_DrawFont_GBK16( 44,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 60,2,BLACK,GRAY0,"." ); tempData = realTimeData.airoutValue % 10; DecimalToASCII( tempData,tempBuf,1 ); Gui_DrawFont_GBK16( 68,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK16( 78,2,BLACK,GRAY0,"ml" ); } } /************************************************************************************* * Function: DrawSetParameterPicture * Object: 绘制输注参数设置画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint16_t tempData = 0;临时计算变量 uint8_t tempLocal = 0; uint8_t tempNumQty = 0; **************************************************************************************/ void DrawSetParameterPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint16_t tempData = 0; uint8_t tempLocal = 0; uint8_t tempNumQty = 0; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,94);//扳手 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"总量" );//xxx ml if( setParamInfo.totalDose >= 100 )//计算数字显示位置,3位数 { tempNumQty = 3; tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == TotalDose ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"___" );//TotalDose } } else if( setParamInfo.totalDose >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == TotalDose ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"__" );//TotalDose } } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == TotalDose ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"_" );//TotalDose } } DecimalToASCII( setParamInfo.totalDose,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 28 + tempLocal,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 51,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 64,7,BLACK,GRAY0,"首次" );//xx ml if( setParamInfo.firstDose >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == FirstDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"__" ); } } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == FirstDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"_" ); } } DecimalToASCII( setParamInfo.firstDose,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 88 + tempLocal,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 111,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"追加" ); //xx.x ml //显示位置计算 tempNumQty = 0; if( setParamInfo.superaddition1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数 { tempNumQty += 2; } if( setParamInfo.superaddition1 / 100 != 0 )//除100不等于0表明十位有数 { tempNumQty += 2;//个位、十位有数 } else { tempNumQty += 1;//个位有数 } tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 //显示数据计算 tempData = setParamInfo.superaddition1 / 10;//显示个位十位数字 if( tempData > 9 )//个位、十位有数 { tempNumQty = 2; if( setParamInfo.emModifyParam == Superaddition ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"__" );//Superaddition } } else//个位有数 { tempNumQty = 1; if( setParamInfo.emModifyParam == Superaddition ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"_" );//Superaddition } } DecimalToASCII( tempData,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 28 + tempLocal,4,BLACK,GRAY0,tempBuf ); tempData = setParamInfo.superaddition1 % 10;//显示小数 if( tempData != 0 ) { tempLocal = 28 + tempLocal + tempNumQty * 5 + 1; if( setParamInfo.emModifyParam == Superaddition ) { Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//Superaddition } Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." ); tempLocal += 5; DecimalToASCII( tempData,tempBuf,1 ); Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf ); } Gui_DrawFont_GBK8( 51,4,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 64,4,BLACK,GRAY0,"持续" );//xx.x ml/h //显示位置计算 tempNumQty = 0; if( setParamInfo.continueDose1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数 { tempNumQty += 2; } if( setParamInfo.continueDose1 / 100 != 0 )//除100不等于0表明十位有数 { tempNumQty += 2;//个位、十位有数 } else { tempNumQty += 1;//个位有数 } tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 //显示数据计算 tempData = setParamInfo.continueDose1 / 10;//显示个位十位数字 if( tempData > 9 )//个位、十位有数 { tempNumQty = 2; if( setParamInfo.emModifyParam == continueDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"__" );//continueDose } } else//个位有数 { tempNumQty = 1; if( setParamInfo.emModifyParam == continueDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"_" );//continueDose } } DecimalToASCII( tempData,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 88 + tempLocal,4,BLACK,GRAY0,tempBuf ); tempData = setParamInfo.continueDose1 % 10;//显示小数 if( tempData != 0 ) { tempLocal = 88 + tempLocal + tempNumQty * 5 + 1; if( setParamInfo.emModifyParam == continueDose ) { Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//continueDose } Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." ); tempLocal += 5; DecimalToASCII( tempData,tempBuf,1 ); Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf ); } Gui_DrawFont_GBK8( 111,4,BLACK,GRAY0,"ml/h" ); Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"锁时" ); if( setParamInfo.lockTime1 >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == LockTime ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"__" );//LockTime } } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == LockTime ) { Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"_" );//LockTime } } DecimalToASCII( setParamInfo.lockTime1,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 28 + tempLocal,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 46,1,BLACK,GRAY0,"min" ); Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,"极限" ); if( setParamInfo.limitDose1 >= 100 )//计算数字显示位置,3位数 { tempNumQty = 3; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == LimitDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"___" );//LimitDose } } else if( setParamInfo.limitDose1 >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == LimitDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"__" );//LimitDose } } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 if( setParamInfo.emModifyParam == LimitDose ) { Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"_" );//LimitDose } } DecimalToASCII( setParamInfo.limitDose1,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 88 + tempLocal,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8( 111,1,BLACK,GRAY0,"ml/h" ); emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 LCDPartClear( 28 , 50 , 6 , 1 );//TotalDose LCDPartClear( 88 , 110 , 6 , 1 );//FirstDose LCDPartClear( 28 , 50 , 3 , 1 );//Superaddition LCDPartClear( 88 , 110 , 3 , 1 );//continueDose LCDPartClear( 28 , 45 , 0 , 1 );//LockTime LCDPartClear( 88 , 110 , 0 , 1 );//LimitDose switch( setParamInfo.emModifyParam ) { case TotalDose: if( setParamInfo.totalDose >= 100 )//计算数字显示位置,3位数 { tempNumQty = 3; tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"___" );//TotalDose } else if( setParamInfo.totalDose >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"__" );//TotalDose } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"_" );//TotalDose } LCDPartClear( 28 , 50 , 7 , 1 );//TotalDose DecimalToASCII( setParamInfo.totalDose,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 28 + tempLocal,7,BLACK,GRAY0,tempBuf ); break; case FirstDose: if( setParamInfo.firstDose >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"__" ); } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"_" ); } LCDPartClear( 88 , 110 , 7 , 1 );//FirstDose DecimalToASCII( setParamInfo.firstDose,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 88 + tempLocal,7,BLACK,GRAY0,tempBuf ); break; case Superaddition: //显示位置计算 tempNumQty = 0; if( setParamInfo.superaddition1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数 { tempNumQty += 2; } if( setParamInfo.superaddition1 / 100 != 0 )//除100不等于0表明十位有数 { tempNumQty += 2;//个位、十位有数 } else { tempNumQty += 1;//个位有数 } tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 //显示数据计算 LCDPartClear( 28 , 50 , 4 , 1 );//Superaddition tempData = setParamInfo.superaddition1 / 10;//显示个位十位数字 if( tempData > 9 )//个位、十位有数 { tempNumQty = 2; Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"__" );//Superaddition } else//个位有数 { tempNumQty = 1; Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"_" );//Superaddition } DecimalToASCII( tempData,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 28 + tempLocal,4,BLACK,GRAY0,tempBuf ); tempData = setParamInfo.superaddition1 % 10;//显示小数 if( tempData != 0 ) { tempLocal = 28 + tempLocal + tempNumQty * 5 + 1; Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//Superaddition Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." ); tempLocal += 5; DecimalToASCII( tempData,tempBuf,1 ); Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf ); } break; case continueDose: //显示位置计算 tempNumQty = 0; if( setParamInfo.continueDose1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数 { tempNumQty += 2; } if( setParamInfo.continueDose1 / 100 != 0 )//除100不等于0表明十位有数 { tempNumQty += 2;//个位、十位有数 } else { tempNumQty += 1;//个位有数 } tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 //显示数据计算 LCDPartClear( 88 , 110 , 4 , 1 );//continueDose tempData = setParamInfo.continueDose1 / 10;//显示个位十位数字 if( tempData > 9 )//个位、十位有数 { tempNumQty = 2; Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"__" );//continueDose } else//个位有数 { tempNumQty = 1; Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"_" );//continueDose } DecimalToASCII( tempData,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 88 + tempLocal,4,BLACK,GRAY0,tempBuf ); tempData = setParamInfo.continueDose1 % 10;//显示小数 if( tempData != 0 ) { tempLocal = 88 + tempLocal + tempNumQty * 5 + 1; Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//continueDose Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." ); tempLocal += 5; DecimalToASCII( tempData,tempBuf,1 ); Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf ); } break; case LockTime: if( setParamInfo.lockTime1 >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"__" );//LockTime } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置? Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"_" );//LockTime } LCDPartClear( 28 , 45 , 1 , 1 );//LockTime DecimalToASCII( setParamInfo.lockTime1,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 28 + tempLocal,1,BLACK,GRAY0,tempBuf ); break; case LimitDose: if( setParamInfo.limitDose1 >= 100 )//计算数字显示位置,3位数 { tempNumQty = 3; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"___" );//LimitDose } else if( setParamInfo.limitDose1 >= 10 )//计算数字显示位置,2位数 { tempNumQty = 2; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"__" );//LimitDose } else//计算数字显示位置,1位数 { tempNumQty = 1; tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置 Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"_" );//LimitDose } LCDPartClear( 88 , 110 , 1 , 1 );//LimitDose DecimalToASCII( setParamInfo.limitDose1,tempBuf,tempNumQty ); Gui_DrawFont_GBK8Number( 88 + tempLocal,1,BLACK,GRAY0,tempBuf ); break; default:break; } } } /************************************************************************************* * Function: DrawPasswordSetPicture * Object: 绘制运行-首次量画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint16_t tempInputDose = 0;临时计算变量 **************************************************************************************/ void DrawRunFirstDosePicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint16_t tempInputDose = 0; if(emSysWorkStep == EnterRunFirstDose) { if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 32,6,BLACK,GRAY0,"总 量" ); DecimalToASCII( setParamInfo.totalDose,tempBuf,3 ); Gui_DrawFont_GBK12( 80,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 106,6,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 32,3,BLACK,GRAY0,"首次量" ); tempInputDose = realTimeData.firstDose / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 80,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 92,3,BLACK,GRAY0,"." ); tempInputDose = realTimeData.firstDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 98,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 106,3,BLACK,GRAY0,"ml" ); emPictureRunState = Update; } else//只更新剩余量数据信息 { if(motorWorkState == MOTOR_WORK_OFF) { if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } // if(motorWorkState == MOTOR_WORK_ON) // { // return; // } DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET ) { switch( modifyStep ) { case 1: DisplayHeader(0x00,0x00,8);//进度条 DisplayHeader(0xff,0xff,5);//进度条 modifyStep = 2; break; case 2: DisplayHeader(0xff,0xff,6);//进度条 modifyStep = 3; break; case 3: DisplayHeader(0xff,0xff,7);//进度条 modifyStep = 4; break; case 4: DisplayHeader(0xff,0xff,8);//进度条 modifyStep = 1; break; default:break; } }*/ // if(motorWorkState == MOTOR_WORK_OFF) { DecimalToASCII( setParamInfo.totalDose,tempBuf,3 ); Gui_DrawFont_GBK12( 80,6,BLACK,GRAY0,tempBuf ); tempInputDose = realTimeData.firstDose / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 80,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 92,3,BLACK,GRAY0,"." ); tempInputDose = realTimeData.firstDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 98,3,BLACK,GRAY0,tempBuf ); } TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR; if( EngineeringModeValue.pressure_switch == 0) //显示打开的话,显示的内容 { //---------------测试------------- //电机电流值 DecimalToASCII( ElectricityData,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf ); //红外传感器值 DecimalToASCII( BubbleData,tempBuf,4 ); Gui_DrawFont_GBK12( 61,1,BLACK,GRAY0,tempBuf ); //发送条数 DecimalToASCII( send_cont,tempBuf,4 ); Gui_DrawFont_GBK12( 106,1,BLACK,GRAY0,tempBuf ); //----------------------------- } } } } } /************************************************************************************* * Function: DrawRunMainPicture * Object: 绘制运行主画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint16_t tempInputDose = 0;临时计算变量 **************************************************************************************/ void DrawRunMainPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint16_t tempInputDose = 0; if(emSysWorkStep == EnterRunMain) { if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"总量" ); DecimalToASCII( setParamInfo.totalDose,tempBuf,3 ); Gui_DrawFont_GBK12( 29,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 48,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 60,7,BLACK,GRAY0,"已输" ); tempInputDose = realTimeData.inputDose / 10; DecimalToASCII( tempInputDose,tempBuf,3 ); Gui_DrawFont_GBK12( 86,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,"." ); tempInputDose = realTimeData.inputDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 119,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"锁时" ); DecimalToASCII( realTimeData.lockTime,tempBuf,2 ); Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 42,4,BLACK,GRAY0,"min" ); Gui_DrawFont_GBK12( 60,4,BLACK,GRAY0,"追加" ); tempInputDose = runParamInfo.superaddition / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 89,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 101,4,BLACK,GRAY0,"." ); tempInputDose = runParamInfo.superaddition % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 107,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 119,4,BLACK,GRAY0,"ml" ); if( EngineeringModeValue.pressure_switch == 1) //显示关闭的话,显示正常的参数 { Gui_DrawFont_GBK12( 60,1,BLACK,GRAY0,"持续" ); tempInputDose = runParamInfo.continueDose / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 96,1,BLACK,GRAY0,"." ); tempInputDose = runParamInfo.continueDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 102,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 108,1,BLACK,GRAY0,"ml/h" ); if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) { Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"无效" ); DecimalToASCII( realTimeData.invalidCount,tempBuf,3 ); } else { Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"有效" ); DecimalToASCII( realTimeData.validCount,tempBuf,3 ); } Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf ); } /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET ) { switch( modifyStep ) { case 1: DisplayHeader(0x00,0x00,8);//进度条 DisplayHeader(0xff,0xff,5);//进度条 modifyStep = 2; break; case 2: DisplayHeader(0xff,0xff,6);//进度条 modifyStep = 3; break; case 3: DisplayHeader(0xff,0xff,7);//进度条 modifyStep = 4; break; case 4: DisplayHeader(0xff,0xff,8);//进度条 modifyStep = 1; break; default:break; } TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR; }*/ emPictureRunState = Update; } else//只更新剩余量数据信息 { if(motorWorkState == MOTOR_WORK_OFF) { if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 // if(motorWorkState == MOTOR_WORK_ON) // { // return; // } /* if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET ) { switch( modifyStep ) { case 1: DisplayHeader(0x00,0x00,8);//进度条 DisplayHeader(0xff,0xff,5);//进度条 modifyStep = 2; break; case 2: DisplayHeader(0xff,0xff,6);//进度条 modifyStep = 3; break; case 3: DisplayHeader(0xff,0xff,7);//进度条 modifyStep = 4; break; case 4: DisplayHeader(0xff,0xff,8);//进度条 modifyStep = 1; break; default:break; } TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR; }*/ DecimalToASCII( setParamInfo.totalDose,tempBuf,3 ); Gui_DrawFont_GBK12( 29,7,BLACK,GRAY0,tempBuf ); tempInputDose = realTimeData.inputDose / 10; DecimalToASCII( tempInputDose,tempBuf,3 ); Gui_DrawFont_GBK12( 86,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,"." ); tempInputDose = realTimeData.inputDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,tempBuf ); if( ( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_SET ) )//锁时数值要闪烁 { // TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_WAIT; Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0," "); // Delay_ms( 300 ); } else if((( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_WSET )) ||(TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_CLEAR)) { // TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_CLEAR; DecimalToASCII( realTimeData.lockTime,tempBuf,2 ); Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf ); } // DecimalToASCII( realTimeData.lockTime,tempBuf,2 ); // Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf ); tempInputDose = runParamInfo.superaddition / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 89,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 101,4,BLACK,GRAY0,"." ); tempInputDose = runParamInfo.superaddition % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 107,4,BLACK,GRAY0,tempBuf ); if( EngineeringModeValue.pressure_switch == 1) //显示关闭的话,显示正常的参数 { tempInputDose = runParamInfo.continueDose / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 96,1,BLACK,GRAY0,"." ); tempInputDose = runParamInfo.continueDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 102,1,BLACK,GRAY0,tempBuf ); if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) { Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"无效" ); DecimalToASCII( realTimeData.invalidCount,tempBuf,3 ); } else { Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"有效" ); DecimalToASCII( realTimeData.validCount,tempBuf,3 ); } // if( ( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET ) )//无效数值要闪烁 if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET) { // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT; Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0," "); // Delay_ms( 300 ); } else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )) // else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR)) // ||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR)) { // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR; Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf ); } // Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf ); } else { //---------------测试------------- // DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2 // Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK12( 40,1,BLACK,GRAY0,"kpa" ); //电机电流值 DecimalToASCII( ElectricityData,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 106,1,BLACK,GRAY0,tempBuf ); //红外传感器值 DecimalToASCII( BubbleData,tempBuf,4 ); Gui_DrawFont_GBK12( 61,1,BLACK,GRAY0,tempBuf ); //发送条数 DecimalToASCII( send_cont,tempBuf,4 ); Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK12( 94,1,BLACK,GRAY0,"ci" ); //-----------------------------*/ //----------lorawan页面显示测试-------------------------- /* if(LoRa_Node.Join == 1) { DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"网络已连接" ); //Gui_DrawFont_GBK12( 40,1,BLACK,GRAY0,"kpa" ); } else { DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"网络未连接" ); }*/ //DecimalToASCII( ElectricityOffData,tempBuf,4 ); //DecimalToASCII( send_cont,tempBuf,4 ); //DecimalToASCII( self_adaption_Pressure,tempBuf,4 );//realTimeData.pressure2 // Gui_DrawFont_GBK12( 70,1,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK12( 94,1,BLACK,GRAY0,"次" ); } } } } } /************************************************************************************* * Function: DrawRunMainPicture * Object: 绘制运行压力画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawRunPressurePicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint8_t i; // if(motorWorkState == MOTOR_WORK_ON) // { // return; // } if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"kp" ); Gui_DrawFont_GBK12( 90,1,BLACK,GRAY0,"t" ); Gui_DrawFont_GBK16( 17,7,BLACK,GRAY0,"^" ); Gui_DrawFont_GBK16( 80,1,BLACK,GRAY0,">" ); for( i = 0; i < 60; i++) { Gui_DrawPoint(20 + i,1,0x01); } for( i = 1; i < 7; i++) { Gui_DrawPoint(20,i,0xff); } // for( i = 1 ; i < 8 ; i++ ) // { // Gui_DrawFont_GBK8( 16,i,BLACK,GRAY0,"|" ); // // Gui_DrawFont_GBK12( 16 + i * 6,1,BLACK,GRAY0,"_" ); // } // for( i = 0 ; i < 8 ; i++ ) // { // Gui_DrawFont_GBK8( 16 + i * 6,1,BLACK,GRAY0,"_" ); // } Gui_DrawFont_GBK12( 90,7,BLACK,GRAY0,"压 力" ); DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 84,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 110,4,BLACK,GRAY0,"kpa" ); //---------------测试自适应压力值---------- //DecimalToASCII( ces_cong,tempBuf,4 ); DecimalToASCII( self_adaption_Pressure,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 84,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 110,2,BLACK,GRAY0,"kpa" ); DecimalToASCII( ces_cong,tempBuf,4 ); //DecimalToASCII( self_adaption_Pressure,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 110,1,BLACK,GRAY0,"kpa" ); //---------------------------------------- emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 84,4,BLACK,GRAY0,tempBuf ); } } /************************************************************************************* * Function: DrawPauseMainPicture * Object: 绘制暂停主画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawPauseMainPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); Gui_DrawFont_GBK12( 115,7,BLACK,GRAY0,"总量" ); DecimalToASCII( setParamInfo.totalDose,tempBuf,3 ); Gui_DrawFont_GBK12( 97,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 77,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 55,7,BLACK,GRAY0,"已输入" ); DecimalToASCII( realTimeData.inputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 22,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 6,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 115,4,BLACK,GRAY0,"锁时" ); DecimalToASCII( runParamInfo.lockTime,tempBuf,2 ); Gui_DrawFont_GBK12( 96,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 83,4,BLACK,GRAY0,"min" ); Gui_DrawFont_GBK12( 55,4,BLACK,GRAY0,"追加量" ); DecimalToASCII( runParamInfo.superaddition,tempBuf,2 ); Gui_DrawFont_GBK12( 22,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 6,4,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 115,1,BLACK,GRAY0,"持续" ); DecimalToASCII( runParamInfo.continueDose,tempBuf,2 ); Gui_DrawFont_GBK12( 96,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 83,1,BLACK,GRAY0,"ml/h" ); Gui_DrawFont_GBK12( 43,1,BLACK,GRAY0,"次数" ); DecimalToASCII( realTimeData.validCount,tempBuf,2 ); Gui_DrawFont_GBK12( 22,1,BLACK,GRAY0,tempBuf ); } /************************************************************************************* * Function: DrawPCAPicture * Object: 绘制PCA画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint16_t tempInputDose = 0;临时计算变量 **************************************************************************************/ void DrawPCAPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint16_t tempInputDose = 0; if(emSysWorkStep == EnterRunMain) { if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 16,7,BLACK,GRAY0,"已输入量" ); tempInputDose = realTimeData.inputDose / 10; DecimalToASCII( tempInputDose,tempBuf,3 ); Gui_DrawFont_GBK12( 79,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 97,7,BLACK,GRAY0,"." );//91 tempInputDose = realTimeData.inputDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 16,5,BLACK,GRAY0,"自 控 量" ); tempInputDose = realTimeData.superaddition / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 79,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 91,5,BLACK,GRAY0,"." ); tempInputDose = realTimeData.superaddition % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 97,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 103,5,BLACK,GRAY0,"ml" ); if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) { Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"无效次数" ); DecimalToASCII( realTimeData.invalidCount,tempBuf,3 ); } else { Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"有效次数" ); DecimalToASCII( realTimeData.validCount,tempBuf,3 ); } Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0,tempBuf ); /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET ) { switch( modifyStep ) { case 1: DisplayHeader(0x00,0x00,8);//进度条 DisplayHeader(0xff,0xff,5);//进度条 modifyStep = 2; break; case 2: DisplayHeader(0xff,0xff,6);//进度条 modifyStep = 3; break; case 3: DisplayHeader(0xff,0xff,7);//进度条 modifyStep = 4; break; case 4: DisplayHeader(0xff,0xff,8);//进度条 modifyStep = 1; break; default:break; } TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR; }*/ emPictureRunState = Update; } else//只更新剩余量数据信息 { if(motorWorkState == MOTOR_WORK_OFF) { if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,82);//锁2 } else { DisplayHeader(0x00,0x00,82);//清锁2 } if( realTimeData.stateRun == Pause ) { DisplayHeader(0xff,0xff,81);//暂停 } else { DisplayHeader(0x00,0x00,81);//暂停 } if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } // if(motorWorkState == MOTOR_WORK_ON) // { // return; // } DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 tempInputDose = realTimeData.inputDose / 10; DecimalToASCII( tempInputDose,tempBuf,3 ); Gui_DrawFont_GBK12( 79,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 97,7,BLACK,GRAY0,"." ); tempInputDose = realTimeData.inputDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,tempBuf ); tempInputDose = realTimeData.superaddition / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 79,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 91,5,BLACK,GRAY0,"." ); tempInputDose = realTimeData.superaddition % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 97,5,BLACK,GRAY0,tempBuf ); if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) { Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"无效次数" ); DecimalToASCII( realTimeData.invalidCount,tempBuf,3 ); } else { Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"有效次数" ); DecimalToASCII( realTimeData.validCount,tempBuf,3 ); } // if( ( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET ) )//无效数值要闪烁 if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET) { // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT; Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0," "); // Delay_ms( 300 ); } else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR)) { // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR; Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0,tempBuf ); } if( EngineeringModeValue.pressure_switch == 0) //显示打开的话,显示的内容 { //---------------测试------------- //电机电流值 DecimalToASCII( ElectricityData,tempBuf,4 );//realTimeData.pressure2 Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf ); //红外传感器值 DecimalToASCII( BubbleData,tempBuf,4 ); Gui_DrawFont_GBK12( 61,1,BLACK,GRAY0,tempBuf ); //发送条数 DecimalToASCII( send_cont,tempBuf,4 ); Gui_DrawFont_GBK12( 106,1,BLACK,GRAY0,tempBuf ); //----------------------------- } /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET ) { switch( modifyStep ) { case 1: DisplayHeader(0x00,0x00,8);//进度条 DisplayHeader(0xff,0xff,5);//进度条 modifyStep = 2; break; case 2: DisplayHeader(0xff,0xff,6);//进度条 modifyStep = 3; break; case 3: DisplayHeader(0xff,0xff,7);//进度条 modifyStep = 4; break; case 4: DisplayHeader(0xff,0xff,8);//进度条 modifyStep = 1; break; default:break; } TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR; }*/ } } } } /************************************************************************************* * Function: DrawLockPasswordPicture * Object: 绘主锁定密码画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawLockPasswordPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint8_t i; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0xff,0xff,92);//锁1 Gui_DrawFont_GBK16( 33,6,BLACK,GRAY0,"锁定密码" ); Gui_DrawFont_GBK16( 53,2,BLACK,GRAY0,"_" ); for( i = 0 ; i < 3 ; i++ ) { verifyPasswordBuf[i] = 0; DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 ); Gui_DrawFont_GBK16( 53 + i * 8,3,BLACK,GRAY0,tempBuf ); } emPictureRunState = Update; } else { switch(modifyStep) { case 1: Gui_DrawFont_GBK16( 53 + ( 1 - 1 ) * 8,2,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK16( 53 + ( 2 - 1 ) * 8,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK16( 53 + ( 3 - 1 ) * 8,2,BLACK,GRAY0," " ); break; case 2: Gui_DrawFont_GBK16( 53 + ( 1 - 1 ) * 8,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK16( 53 + ( 2 - 1 ) * 8,2,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK16( 53 + ( 3 - 1 ) * 8,2,BLACK,GRAY0," " ); break; case 3: Gui_DrawFont_GBK16( 53 + ( 1 - 1 ) * 8,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK16( 53 + ( 2 - 1 ) * 8,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK16( 53 + ( 3 - 1 ) * 8,2,BLACK,GRAY0,"_" ); break; default:break; } for( i = 0 ; i < 3 ; i++ ) { DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 ); Gui_DrawFont_GBK16( 53 + i * 8,3,BLACK,GRAY0,tempBuf ); } } } /************************************************************************************* * Function: DrawTransfuseOverPicture * Object: 绘制输注完毕画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 uint16_t tempInputDose = 0;临时计算变量 **************************************************************************************/ void DrawTransfuseOverPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; uint16_t tempInputDose = 0; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET ) { DisplayHeader(0xff,0xff,34);//呼叫 } else { DisplayHeader(0x00,0x00,34);//呼叫 } DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,7,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,7,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,7,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"输液结束!!" ); Gui_DrawFont_GBK12( 29,3,BLACK,GRAY0,"已输入" ); tempInputDose = realTimeData.inputDose / 10; DecimalToASCII( tempInputDose,tempBuf,3 ); Gui_DrawFont_GBK12( 65,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 83,3,BLACK,GRAY0,"." ); tempInputDose = realTimeData.inputDose % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 89,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 98,3,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"追加量" ); // DecimalToASCII( realTimeData.superaddition,tempBuf,2 ); tempInputDose = realTimeData.superaddition / 10; DecimalToASCII( tempInputDose,tempBuf,2 ); Gui_DrawFont_GBK12( 46,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"." ); tempInputDose = realTimeData.superaddition % 10; DecimalToASCII( tempInputDose,tempBuf,1 ); Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 72,1,BLACK,GRAY0,"ml" ); Gui_DrawFont_GBK12( 88,1,BLACK,GRAY0,"次数" ); DecimalToASCII( realTimeData.validCount,tempBuf,2 ); Gui_DrawFont_GBK12( 118,1,BLACK,GRAY0,tempBuf ); // SysHornToneTyoe = InfusionTone;//蜂鸣器-输入结束 // speakerWorkStep = emSpeakerNoneWork; // TaskSchedulerFlag.speakerFlag = TASK_FLAG_WAIT; // TaskSchedulerTimer.speakerWaitTimer = ONE_SECOND_TIMER;//在界面显示出来后,做1S延时 为下次进入蜂鸣器计时做准备 } /************************************************************************************* * Function: DrawAlarmDevicePicture * Object: 绘制机械故障画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmDevicePicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"机械故障!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawAlarmJamPicture * Object: 绘制堵塞故障画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmJamPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"堵塞!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawAlarmMaxPicture * Object: 绘制极限量故障画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmMaxPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"极限!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawAlarmMaxPicture * Object: 绘制气泡无液报警画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmBubblePicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"气泡无液!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawAlarmNonePillCasePicture * Object: 绘制无药盒报警画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmNonePillCasePicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"未装药盒!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawAlarmLowVoltPicture * Object: 绘制低电压报警画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmLowVoltPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"电量耗尽!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawAlarmLineLostPicture * Object: 绘制管路脱落警画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawAlarmLineLostPicture( void ) { // uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 /*DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );*/ Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"管路脱落!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: InputTotalPicture * Object: 绘制输入量大于输入总量是,报警界面 2017.03.17 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void InputTotalPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 DisplayHeader(0x00,0x01,61);//报警 DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 19,3,BLACK,GRAY0,"总输注量报警!!" ); // sysPromptToneType = WarringTone;//蜂鸣器-故障报警 } /************************************************************************************* * Function: DrawEngineeringMode1Picture * Object: 绘制工程模式1画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawEngineeringMode1Picture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"病区位数"); DecimalToASCII( EngineeringModeValue.sickroomQty,tempBuf,1 ); Gui_DrawFont_GBK8Number( 73,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 73,6,BLACK,GRAY0,"_" ); Gui_DrawFont_GBK12( 83,7,BLACK,GRAY0,"网络"); if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF ) { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"病床位数"); DecimalToASCII( EngineeringModeValue.bedNOQty,tempBuf,1 ); Gui_DrawFont_GBK8Number( 73,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 83,5,BLACK,GRAY0,"查询"); if( EngineeringModeValue.seachState == 1 ) { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"自控流速"); DecimalToASCII( EngineeringModeValue.selfcontrol,tempBuf,3 ); Gui_DrawFont_GBK8Number( 61,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 83,3,BLACK,GRAY0,"密码"); if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF ) { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"住院号位数"); DecimalToASCII( EngineeringModeValue.hospitalNOQty,tempBuf,2 ); Gui_DrawFont_GBK8Number( 67,1,BLACK,GRAY0,tempBuf ); emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch( emEngineeringMode1Choose ) { case SickroomQty: Gui_DrawFont_GBK8Number( 73,6,BLACK,GRAY0,"_" );//病区 DecimalToASCII( EngineeringModeValue.sickroomQty,tempBuf,1 ); Gui_DrawFont_GBK8Number( 73,7,BLACK,GRAY0,tempBuf ); if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )//网络 { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开"); } break; case NetworkState: Gui_DrawFont_GBK8Number( 73,6,BLACK,GRAY0," " );//病区 if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )//网络 { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"羊");//关 } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"丰");//开 } Gui_DrawFont_GBK8Number( 73,4,BLACK,GRAY0," " );//病床 break; case BedNOQty: if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )//网络 { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");//关 } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");//开 } Gui_DrawFont_GBK8Number( 73,4,BLACK,GRAY0,"_" );//病床 DecimalToASCII( EngineeringModeValue.bedNOQty,tempBuf,1 ); Gui_DrawFont_GBK8Number( 73,5,BLACK,GRAY0,tempBuf ); if( EngineeringModeValue.seachState == 1 )//查询 { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开"); } break; case SeachState: Gui_DrawFont_GBK8Number( 73,4,BLACK,GRAY0," " );//病床 if( EngineeringModeValue.seachState == 1 )//查询 { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"丰"); } Gui_DrawFont_GBK8Number( 61,2,BLACK,GRAY0," " );//自控流量 break; case Selfcontrol: if( EngineeringModeValue.seachState == 1 )//查询 { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK8Number( 61,2,BLACK,GRAY0,"___" );//自控流量 DecimalToASCII( EngineeringModeValue.selfcontrol,tempBuf,3 ); Gui_DrawFont_GBK8Number( 61,3,BLACK,GRAY0,tempBuf ); if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )//密码 { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开"); } break; case PasswordState: Gui_DrawFont_GBK8Number( 61,2,BLACK,GRAY0," " );//自控流量 if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )//密码 { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"丰"); } Gui_DrawFont_GBK8Number( 67,0,BLACK,GRAY0," " );//住院号 break; case HospitalNOQty: if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )//密码 { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK8Number( 67,0,BLACK,GRAY0,"__" );//住院号 DecimalToASCII( EngineeringModeValue.hospitalNOQty,tempBuf,2 ); Gui_DrawFont_GBK8Number( 67,1,BLACK,GRAY0,tempBuf ); break; default:break; } } } /************************************************************************************* * Function: DrawEngineeringMode2Picture * Object: 绘制工程模式2画面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawEngineeringMode2Picture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"机械报警"); if( EngineeringModeValue.deviceAlarm == 1 ) { Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"羊");//关带下划线用羊代替 } else { Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"丰");//开带下划线用丰代替 } Gui_DrawFont_GBK12( 80,7,BLACK,GRAY0,"声音"); if( EngineeringModeValue.silenceState == 0 )//修改于2019.02.13“1-0” { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"气泡无液"); if( EngineeringModeValue.bubbleAlarm == 1 ) { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"开"); } Gui_DrawFont_GBK12( 80,5,BLACK,GRAY0,"扣合"); if( EngineeringModeValue.closedState == 1 ) { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开"); } if( EngineeringModeValue.automatic == 1 ) { Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量 Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,"150"); } else { Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量 Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,"001"); } Gui_DrawFont_GBK12( 80,3,BLACK,GRAY0,"堵塞"); if( EngineeringModeValue.jamAlarm == 1 ) { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开"); } //-----------增加压力显示界面--------------- Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"压力显示"); if( EngineeringModeValue.pressure_switch == 1 ) { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"开"); } //-----------增加测试界面--------------- Gui_DrawFont_GBK12( 80,1,BLACK,GRAY0,"测试"); if(EngineeringModeValue.test == 1) { Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"开"); } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch( emEngineeringMode1Choose ) { case DeviceAlarm: if( EngineeringModeValue.deviceAlarm == 1 )//机械报警 { Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"羊");//关带下划线用羊代替 } else { Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"丰");//开带下划线用丰代替 } if( EngineeringModeValue.silenceState == 0 )//静音//修改于2019.02.13“1-0” { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开"); } break; case SilenceState: if( EngineeringModeValue.deviceAlarm == 1 )//机械报警 { Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"关");//关带下划线用羊代替 } else { Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"开");//开带下划线用丰代替 } if( EngineeringModeValue.silenceState == 0 )//静音//修改于2019.02.13“1-0” { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"丰"); } if( EngineeringModeValue.bubbleAlarm == 1 )//气泡或无液 { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"开"); } break; case BubbleAlarm: if( EngineeringModeValue.silenceState == 0 )//静音//修改于2019.02.13“1-0” { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开"); } if( EngineeringModeValue.bubbleAlarm == 1 )//气泡或无液 { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"丰"); } if( EngineeringModeValue.closedState == 1 )//扣合 { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开"); } break; case ClosedState: if( EngineeringModeValue.bubbleAlarm == 1 )//气泡或无液 { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"开"); } if( EngineeringModeValue.closedState == 1 )//扣合 { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"丰"); } if( EngineeringModeValue.automatic == 1 )//自动调整 { //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17 Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " ); DecimalToASCII( 150,tempBuf,3 ); Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf ); } else { //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17 Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " ); DecimalToASCII( 1,tempBuf,3 ); Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf ); } break; case Automatic: if( EngineeringModeValue.closedState == 1 )//扣合 { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开"); } if( EngineeringModeValue.automatic == 1 )//自动调整 { //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17 Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量 Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0,"___" ); DecimalToASCII( 150,tempBuf,3 ); Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf ); /*if(TotalDoesChange1 == 1) { InputTotalDoseBuff[0]=0; InputTotalDoseBuff[1]=0; InputTotalDoseBuff[2]=0; InputTotalDoseBuff[3]=0; //Write_Multi31256RAM(HISTORY31256_DATA_InputTotalDose,InputTotalDoseBuff,4); FlashWriteOperate( InputTotalDoseBuff,4,HISTORY31256_DATA_InputTotalDose ); }*/ } else { //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.4");//2017.03.17 Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量 Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0,"___" );//病区 DecimalToASCII( 1,tempBuf,3 ); Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf ); /*if(TotalDoesChange0 == 1) { InputTotalDoseBuff[0]=(uint8_t)(149000>>24); InputTotalDoseBuff[1]=(uint8_t)(149000>>16); InputTotalDoseBuff[2]=(uint8_t)(149000>>8); InputTotalDoseBuff[3]=(uint8_t)149000; //Write_Multi31256RAM(HISTORY31256_DATA_InputTotalDose,InputTotalDoseBuff,4); FlashWriteOperate( InputTotalDoseBuff,4,HISTORY31256_DATA_InputTotalDose ); }*/ } if( EngineeringModeValue.jamAlarm == 1 )//堵塞 { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开"); } break; case JamAlarm: if( EngineeringModeValue.automatic == 1 )//自动调整 { //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17 Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " ); DecimalToASCII( 150,tempBuf,3 ); Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf ); } else { //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17 Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " ); DecimalToASCII( 001,tempBuf,3 ); Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf ); } if( EngineeringModeValue.jamAlarm == 1 )//堵塞 { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"丰"); } if( EngineeringModeValue.pressure_switch == 1 )//压力显示 { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"开"); } break; //---------------增加压力显示开关------------------- case pressure_button: if( EngineeringModeValue.jamAlarm == 1 )//堵塞 { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开"); } if( EngineeringModeValue.pressure_switch == 1 )//压力显示 { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"丰"); } if(EngineeringModeValue.test == 1)//测试开关 { Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"开"); } break; case test: if( EngineeringModeValue.pressure_switch == 1 )//压力显示 { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"关"); } else { Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"开"); } if(EngineeringModeValue.test == 1)//测试开关 { Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"羊"); } else { Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"丰"); } default:break; } } } /************************************************************************************* * Function: DrawTest1Picture * Object: 绘制测试画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawTest1Picture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DecimalToASCII( displayTimeBuf.year,tempBuf,4 ); Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 28,7,BLACK,GRAY0,"/" ); DecimalToASCII( displayTimeBuf.month,tempBuf,2 ); Gui_DrawFont_GBK12( 34,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 46,7,BLACK,GRAY0,"/" ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 ); Gui_DrawFont_GBK12( 52,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 64,7,BLACK,GRAY0," " ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 ); Gui_DrawFont_GBK12( 70,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 82,7,BLACK,GRAY0,":" ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 ); Gui_DrawFont_GBK12( 88,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 100,7,BLACK,GRAY0," " ); DecimalToASCII( displayTimeBuf.seconds,tempBuf,2 ); Gui_DrawFont_GBK12( 106,7,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 4,5,BLACK,GRAY0,"Volt:"); DecimalToASCII( batteryAverage,tempBuf,4 ); Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 58,5,BLACK,GRAY0,"-" ); DecimalToASCII( realTimeData.batteryVolt,tempBuf,3 ); Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 4,4,BLACK,GRAY0,"Pressure1:");//压力值 DecimalToASCII( realTimeData.pressureF,tempBuf,4 ); Gui_DrawFont_GBK8Number( 64,4,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK8Number( 88,4,BLACK,GRAY0,"-" ); // DecimalToASCII( realTimeData.pressure,tempBuf,3 ); // Gui_DrawFont_GBK8Number( 94,4,BLACK,GRAY0,tempBuf ); // // Gui_DrawFont_GBK8Number( 4,3,BLACK,GRAY0,"Pressure2:");//压强值 // DecimalToASCII( realTimeData.pressureF2,tempBuf,4 ); // Gui_DrawFont_GBK8Number( 64,3,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK8Number( 88,3,BLACK,GRAY0,"-" ); // DecimalToASCII( realTimeData.pressure2,tempBuf,3 ); // Gui_DrawFont_GBK8Number( 94,3,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK8Number( 4,5,BLACK,GRAY0,"Volt:"); // DecimalToASCII( ADC_ConvertedValue[0],tempBuf,4 ); // Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf ); // Gui_DrawFont_GBK8Number( 58,5,BLACK,GRAY0,"-" ); // DecimalToASCII( batteryAverage,tempBuf,3 ); // Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf ); if( ( TaskSchedulerFlag.zigbeeComReadFlag != TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.zigbeeXmitFlag != TASK_FLAG_CLEAR ) ) { Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee open " ); } else { Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee close" ); } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DecimalToASCII( displayTimeBuf.year,tempBuf,4 );//年 Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.month,tempBuf,2 );//月 Gui_DrawFont_GBK12( 34,7,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.date,tempBuf,2 );//日 Gui_DrawFont_GBK12( 52,7,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );//时 Gui_DrawFont_GBK12( 70,7,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );//分 Gui_DrawFont_GBK12( 88,7,BLACK,GRAY0,tempBuf ); DecimalToASCII( displayTimeBuf.seconds,tempBuf,2 );//秒 Gui_DrawFont_GBK12( 106,7,BLACK,GRAY0,tempBuf ); DecimalToASCII( batteryAverage,tempBuf,4 );//电池信息 Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf ); DecimalToASCII( realTimeData.batteryVolt,tempBuf,3 ); Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf ); if( TaskSchedulerFlag.testDispFlag == TASK_FLAG_CLEAR ) { DecimalToASCII( 0,tempBuf,4 );//压力值 Gui_DrawFont_GBK8Number( 64,4,BLACK,GRAY0,tempBuf ); } else { DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//压力值 Gui_DrawFont_GBK8Number( 64,4,BLACK,GRAY0,tempBuf ); if( testDispCounts >= 3 )//显示出值后就清零,有采集值更新时方便看 { testDispCounts = 0; TaskSchedulerFlag.testDispFlag = TASK_FLAG_CLEAR; } } // DecimalToASCII( realTimeData.pressure,tempBuf,3 ); // Gui_DrawFont_GBK8Number( 94,4,BLACK,GRAY0,tempBuf ); // // DecimalToASCII( realTimeData.pressureF2,tempBuf,4 );//压强值 // Gui_DrawFont_GBK8Number( 64,3,BLACK,GRAY0,tempBuf ); // DecimalToASCII( realTimeData.pressure2,tempBuf,3 ); // Gui_DrawFont_GBK8Number( 94,3,BLACK,GRAY0,tempBuf ); // DecimalToASCII( ADC_ConvertedValue[0],tempBuf,4 );//电池信息 // Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf ); // DecimalToASCII( batteryAverage,tempBuf,3 ); // Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf ); if( ( TaskSchedulerFlag.zigbeeComReadFlag != TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.zigbeeXmitFlag != TASK_FLAG_CLEAR ) ) { Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee open " ); } else { Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee close" ); } } } /************************************************************************************* * Function: DrawEvaluateTransfusePicture * Object: 绘制输注评价画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawEvaluateTransfusePicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"输注评价" ); if( emEvaluateTransfuseChoose == Pruritus ) { Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0,"__" );//瘙痒 } Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"瘙 痒" ); DecimalToASCII( evaluateTransfuseValue.pruritus,tempBuf,2 ); Gui_DrawFont_GBK8Number( 55,5,BLACK,GRAY0,tempBuf ); if( emEvaluateTransfuseChoose == RASS ) { Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0,"__" );//镇静评分 } Gui_DrawFont_GBK12( 68,5,BLACK,GRAY0,"镇静评分" ); DecimalToASCII( evaluateTransfuseValue.RASS,tempBuf,2 ); Gui_DrawFont_GBK8Number( 118,5,BLACK,GRAY0,tempBuf ); if( emEvaluateTransfuseChoose == PONV ) { Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0,"__" );//恶心呕吐 } Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"恶心呕吐" ); DecimalToASCII( evaluateTransfuseValue.PONV,tempBuf,2 ); Gui_DrawFont_GBK8Number( 55,3,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 68,3,BLACK,GRAY0,"四肢肌力" ); if( emEvaluateTransfuseChoose == LimbMyodynamia ) { Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0,"<==" );//四肢肌力 } Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"疼痛评价" ); if( emEvaluateTransfuseChoose == PainEvaluate ) { Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0,"<==" );//疼痛评价 } Gui_DrawFont_GBK12( 68,1,BLACK,GRAY0,"确认评价" ); if( emEvaluateTransfuseChoose == VerifyEvaluate ) { Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0,"<==" );//确认评价 } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch(emEvaluateTransfuseChoose) { case Pruritus: Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0,"__" );//瘙痒 Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分 Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐 Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力 Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价 Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价 DecimalToASCII( evaluateTransfuseValue.pruritus,tempBuf,2 ); Gui_DrawFont_GBK8Number( 55,5,BLACK,GRAY0,tempBuf ); break; case RASS: Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒 Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0,"__" );//镇静评分 Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐 Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力 Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价 Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价 DecimalToASCII( evaluateTransfuseValue.RASS,tempBuf,2 ); Gui_DrawFont_GBK8Number( 118,5,BLACK,GRAY0,tempBuf ); break; case PONV: Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒 Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分 Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0,"__" );//恶心呕吐 Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力 Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价 Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价 DecimalToASCII( evaluateTransfuseValue.PONV,tempBuf,2 ); Gui_DrawFont_GBK8Number( 55,3,BLACK,GRAY0,tempBuf ); break; case LimbMyodynamia: Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒 Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分 Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐 Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0,"<==" );//四肢肌力 Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价 Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价 break; case PainEvaluate: Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒 Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分 Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐 Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力 Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0,"<==" );//疼痛评价 Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价 break; case VerifyEvaluate: Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒 Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分 Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐 Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力 Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价 Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0,"<==" );//确认评价 break; default:break; } } } /************************************************************************************* * Function: DrawEvaluatePainPicture * Object: 绘制疼痛评价画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawEvaluatePainPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"输注评价" ); Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"静止" ); DecimalToASCII( evaluateTransfuseValue.Static,tempBuf,2 ); Gui_DrawFont_GBK8Number( 34,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0,"__" ); Gui_DrawFont_GBK12( 68,4,BLACK,GRAY0,"活动" ); DecimalToASCII( evaluateTransfuseValue.Activity,tempBuf,2 ); Gui_DrawFont_GBK8Number( 98,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,2,BLACK,GRAY0,"满意度" ); DecimalToASCII( evaluateTransfuseValue.CACSI,tempBuf,2 ); Gui_DrawFont_GBK8Number( 64,2,BLACK,GRAY0,tempBuf ); emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch(emEvaluateTransfuseChoose) { case Static: DecimalToASCII( evaluateTransfuseValue.Static,tempBuf,2 ); Gui_DrawFont_GBK8Number( 34,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0,"__" ); Gui_DrawFont_GBK8Number( 98,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8Number( 64,1,BLACK,GRAY0," " ); if( evaluateTransfuseValue.Static == 1 ) { Gui_DrawFont_GBK12( 49,4,BLACK,GRAY0,"轻" ); } else if( evaluateTransfuseValue.Static == 2 ) { Gui_DrawFont_GBK12( 49,4,BLACK,GRAY0,"中" ); } else if( evaluateTransfuseValue.Static == 3 ) { Gui_DrawFont_GBK12( 49,4,BLACK,GRAY0,"重" ); } break; case Activity: DecimalToASCII( evaluateTransfuseValue.Activity,tempBuf,2 ); Gui_DrawFont_GBK8Number( 98,4,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8Number( 98,3,BLACK,GRAY0,"__" ); Gui_DrawFont_GBK8Number( 64,1,BLACK,GRAY0," " ); if( evaluateTransfuseValue.Activity == 1 ) { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"轻" ); } else if( evaluateTransfuseValue.Activity == 2 ) { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"中" ); } else if( evaluateTransfuseValue.Activity == 3 ) { Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"重" ); } break; case CACSI: DecimalToASCII( evaluateTransfuseValue.CACSI,tempBuf,2 ); Gui_DrawFont_GBK8Number( 64,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8Number( 98,3,BLACK,GRAY0," " ); Gui_DrawFont_GBK8Number( 64,1,BLACK,GRAY0,"__" ); if( evaluateTransfuseValue.CACSI == 1 ) { Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0,"不满意" ); } else if( evaluateTransfuseValue.CACSI == 2 ) { Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0,"一 般" ); } else if( evaluateTransfuseValue.CACSI == 3 ) { Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0,"满 意" ); } break; default:break; } } } /************************************************************************************* * Function: DrawLimbMyodynamiaPicture * Object: 绘制四肢肌力画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawLimbMyodynamiaPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"四肢肌力" ); Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"左上肢" ); DecimalToASCII( evaluateTransfuseValue.LeftArm,tempBuf,2 ); Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0,"__" ); Gui_DrawFont_GBK8Number( 46,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 68,5,BLACK,GRAY0,"左下肢" ); DecimalToASCII( evaluateTransfuseValue.LeftLeg,tempBuf,2 ); Gui_DrawFont_GBK8Number( 110,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 4,2,BLACK,GRAY0,"右上肢" ); DecimalToASCII( evaluateTransfuseValue.RightArm,tempBuf,2 ); Gui_DrawFont_GBK8Number( 46,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 68,2,BLACK,GRAY0,"右下肢" ); DecimalToASCII( evaluateTransfuseValue.RightLeg,tempBuf,2 ); Gui_DrawFont_GBK8Number( 110,2,BLACK,GRAY0,tempBuf ); emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch(emEvaluateTransfuseChoose) { case LeftArm: DecimalToASCII( evaluateTransfuseValue.LeftArm,tempBuf,2 ); Gui_DrawFont_GBK8Number( 46,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0,"__" );//LeftArm Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0," " );//LeftLeg Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0," " );//RightArm Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0," " );//RightLeg break; case LeftLeg: DecimalToASCII( evaluateTransfuseValue.LeftLeg,tempBuf,2 ); Gui_DrawFont_GBK8Number( 110,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0," " );//LeftArm Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0,"__" );//LeftLeg Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0," " );//RightArm Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0," " );//RightLeg break; case RightArm: DecimalToASCII( evaluateTransfuseValue.RightArm,tempBuf,2 ); Gui_DrawFont_GBK8Number( 46,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0," " );//LeftArm Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0," " );//LeftLeg Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0,"__" );//RightArm Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0," " );//RightLeg break; case RightLeg: DecimalToASCII( evaluateTransfuseValue.RightLeg,tempBuf,2 ); Gui_DrawFont_GBK8Number( 110,2,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0," " );//LeftArm Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0," " );//LeftLeg Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0," " );//RightArm Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0,"__" );//RightLeg break; default:break; } } } /************************************************************************************* * Function: DrawEvaluateUploadEnterPicture * Object: 绘制进入评价上传画面 * 输入: 无 * 输出: 无 * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作 **************************************************************************************/ void DrawEvaluateUploadEnterPicture( void ) { uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 }; if( emPictureRunState == FirstEnter ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"驼人科技" ); Gui_DrawFont_GBK12( 10,5,BLACK,GRAY0,"评价人" ); DecimalToASCII( evaluateTransfuseValue.Valuer,tempBuf,2 ); Gui_DrawFont_GBK12( 52,5,BLACK,GRAY0,tempBuf ); if( emEvaluateTransfuseChoose == Valuer ) { Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"<==" ); } Gui_DrawFont_GBK12( 10,3,BLACK,GRAY0,"上传确认评价" ); if( emEvaluateTransfuseChoose == VerifyUpload ) { Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"<==" ); } if( emEvaluateTransfuseChoose == Uploading ) { Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"正在上传" ); } else if( emEvaluateTransfuseChoose == UploadFinshed ) { Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"上传成功" ); } emPictureRunState = Update; } else { DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 switch(emEvaluateTransfuseChoose) { case Valuer: DecimalToASCII( evaluateTransfuseValue.Valuer,tempBuf,2 ); Gui_DrawFont_GBK12( 52,5,BLACK,GRAY0,tempBuf ); Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"<==" ); Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0," " ); // Gui_DrawFont_GBK24( 110,130,BLACK,GRAY0,"__" ); // Gui_DrawFont_GBK24( 170,165,BLACK,GRAY0," " ); break; case VerifyUpload: Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"<==" ); // Gui_DrawFont_GBK24( 110,130,BLACK,GRAY0," " ); // Gui_DrawFont_GBK24( 170,165,BLACK,GRAY0,"<==" ); // Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0," " ); break; case Uploading: Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"正在上传" ); break; case UploadFinshed: Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0," " ); Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"上传成功" ); break; case UploadFall: Gui_DrawFont_GBK24( 110,130,BLACK,GRAY0," " ); Gui_DrawFont_GBK24( 170,165,BLACK,GRAY0,"<==" ); Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"上传失败 请重新上传" ); break; default:break; } } } /************************************************************************************* * Function: DrawEvaluateUploadingPicture * Object: 绘制正在上传评价画面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawEvaluateUploadingPicture( void ) { LCDClear( GRAY0 ); DrawBatteryDisplay();//电池 DrawSignalDisplay();//信号 DrawSilenceDisplay();//静音 Gui_DrawLine(0,60,320,60,BLACK); Gui_DrawFont_GBK24( 95,70,BLACK,GRAY0,"驼 人 科 技" ); Gui_DrawFont_GBK24( 10,110,BLACK,GRAY0,"评价人" ); Gui_DrawFont_GBK24( 110,115,BLACK,GRAY0,"0 0" ); Gui_DrawFont_GBK24( 10,160,BLACK,GRAY0,"上传确认评价" ); Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"正在上传" ); } /************************************************************************************* * Function: DrawEvaluateUploadingSuccessPicture * Object: 绘制上传评价成功画面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawEvaluateUploadingSuccessPicture( void ) { LCDClear( GRAY0 ); Gui_DrawLine(0,60,320,60,BLACK); Gui_DrawFont_GBK24( 95,70,BLACK,GRAY0,"驼 人 科 技" ); Gui_DrawFont_GBK24( 10,110,BLACK,GRAY0,"评价人" ); Gui_DrawFont_GBK24( 110,115,BLACK,GRAY0,"0 0" ); Gui_DrawFont_GBK24( 10,160,BLACK,GRAY0,"上传确认评价" ); Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"上传成功" ); } /************************************************************************************* * Function: DrawEvaluateUploadingFailPicture * Object: 绘制上传评价失败画面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawEvaluateUploadingFailPicture( void ) { LCDClear( GRAY0 ); Gui_DrawLine(0,60,320,60,BLACK); Gui_DrawFont_GBK24( 95,70,BLACK,GRAY0,"驼 人 科 技" ); Gui_DrawFont_GBK24( 10,110,BLACK,GRAY0,"评价人" ); Gui_DrawFont_GBK24( 110,115,BLACK,GRAY0,"0 0" ); Gui_DrawFont_GBK24( 10,160,BLACK,GRAY0,"上传确认评价" ); Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"上传失败 请重新上传" ); } /************************************************************************************* * Function: LCDPictureDisplay * Object: 调用所有绘制界面函数 * 输入: 无 * 输出: 无 * 备注: 此函数用来调用当前应该显示的界面 * 重要变量: * emDisplayPicture用来调用应显示的界面 * emCurrentPicture此变量用来防止界面反复刷新 **************************************************************************************/ void LCDPictureDisplay( void ) { switch(emDisplayPicture) { //启动界面 case Startup: emDisplayPicture = WaitDisp; emCurrentPicture = Startup; DrawStartupPicture(); break; //设备ID case DeviceID: emDisplayPicture = DispCurrent; emCurrentPicture = DeviceID; DrawDeviceIDPicture(); break; //时间显示 case TimeDisp: emDisplayPicture = DispCurrent; emCurrentPicture = TimeDisp; DrawTimeDispPicture(); break; //时间设置 case TimeSetDisp: emDisplayPicture = DispCurrent; emCurrentPicture = TimeSetDisp; DrawTimeSetPicture(); break; //密码设置 case PasswordSetDisp: emDisplayPicture = DispCurrent; emCurrentPicture = PasswordSetDisp; DrawPasswordSetPicture(); break; //确认住院信息 case VerifyInfoDisp: emDisplayPicture = DispCurrent; emCurrentPicture = VerifyInfoDisp; DrawVerifyInfoPicture(); break; //设置确认住院信息 case SetVerifyInfoDisp: emDisplayPicture = DispCurrent; emCurrentPicture = SetVerifyInfoDisp; DrawSetVerifyInfoPicture(); break; //排气 case AiroutDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AiroutDisp; DrawAiroutPicture(); break; //设置 case SetParamDisp: emDisplayPicture = DispCurrent; emCurrentPicture = SetParamDisp; DrawSetParameterPicture(); break; //历史数据首页 case HistoryFisrtDisp: emDisplayPicture = DispCurrent; emCurrentPicture = HistoryFisrtDisp; DrawHistoryFirstPicture(); break; //历史数据第二页 case HistorySecondDisp: emDisplayPicture = DispCurrent; emCurrentPicture = HistorySecondDisp; DrawHistorySecondPicture(); break; //运行首次量 case RunFirstDoseDisp: emDisplayPicture = DispCurrent; emCurrentPicture = RunFirstDoseDisp; DrawRunFirstDosePicture(); break; //运行界面 case RunMainDisp: emDisplayPicture = DispCurrent; emCurrentPicture = RunMainDisp; DrawRunMainPicture(); // DrawTest1Picture(); break; //压力界面 case RunPressureDisp: emDisplayPicture = DispCurrent; emCurrentPicture = RunPressureDisp; DrawRunPressurePicture(); break; //运行PCA显示 case RunPCADisp: emDisplayPicture = DispCurrent; emCurrentPicture = RunPCADisp; DrawPCAPicture(); break; // 密码显示 case LockPasswordDisp: emDisplayPicture = DispCurrent; emCurrentPicture = LockPasswordDisp; DrawLockPasswordPicture(); break; //输液完毕 case TransfuseOverDisp: emDisplayPicture = DispCurrent; emCurrentPicture = TransfuseOverDisp; DrawTransfuseOverPicture(); break; //机械故障 case AlarmDeviceDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmDeviceDisp; DrawAlarmDevicePicture(); break; //堵塞故障 case AlarmJamDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmJamDisp; DrawAlarmJamPicture(); break; //极限量 case AlarmMaxDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmMaxDisp; DrawAlarmMaxPicture(); break; //气泡或无液 case AlarmBubbleDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmBubbleDisp; DrawAlarmBubblePicture(); break; //未装药盒 case AlarmNonePillCaseDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmNonePillCaseDisp; DrawAlarmNonePillCasePicture(); break; //电压低 case AlarmLowVoltDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmLowVoltDisp; DrawAlarmLowVoltPicture(); break; //管路脱落 case AlarmLineLostDisp: emDisplayPicture = DispCurrent; emCurrentPicture = AlarmLineLostDisp; DrawAlarmLineLostPicture(); break; //输注评价 case EvaluateTransfuseDisp: emDisplayPicture = DispCurrent; emCurrentPicture = EvaluateTransfuseDisp; DrawEvaluateTransfusePicture(); break; //疼痛评价 case EvaluatePainDisp: emDisplayPicture = DispCurrent; emCurrentPicture = EvaluatePainDisp; DrawEvaluatePainPicture(); break; //四肢肌力 case LimbMyodynamiaDisp: emDisplayPicture = DispCurrent; emCurrentPicture = LimbMyodynamiaDisp; DrawLimbMyodynamiaPicture(); break; //进入评价上传 case EvaluateUploadEnterDisp: emDisplayPicture = DispCurrent; emCurrentPicture = EvaluateUploadEnterDisp; DrawEvaluateUploadEnterPicture(); break; //正在上传评价 case EvaluateUploadingDisp: emDisplayPicture = DispCurrent; emCurrentPicture = EvaluateUploadingDisp; DrawEvaluateUploadingPicture(); break; //上传评价成功 case EvaluateUploadSuccessDisp: emDisplayPicture = DispCurrent; emCurrentPicture = EvaluateUploadSuccessDisp; DrawEvaluateUploadingSuccessPicture(); break; //上传评价失败 case EvaluateUploadFailDisp: emDisplayPicture = DispCurrent; emCurrentPicture = EvaluateUploadFailDisp; DrawEvaluateUploadingFailPicture(); break; //工程模式1 case EngineeringMode1Disp: emDisplayPicture = DispCurrent; emCurrentPicture = EngineeringMode1Disp; DrawEngineeringMode1Picture(); break; //工程模式2 case EngineeringMode2Disp: emDisplayPicture = DispCurrent; emCurrentPicture = EngineeringMode2Disp; DrawEngineeringMode2Picture(); break; //测试页显示 case Test1Disp: emDisplayPicture = DispCurrent; emCurrentPicture = Test1Disp; DrawTest1Picture(); break; //清屏 case ClearDisp: LCDClear( GRAY0 ); break; //输入总量报警显示 2017.03.17 case Input_total: emDisplayPicture = DispCurrent; emCurrentPicture = Input_total; InputTotalPicture(); break; case Inpatien: emDisplayPicture = DispCurrent; emCurrentPicture = Inpatien; DrawNoInpatientPicture(); break; default:break; } if( realTimeData.stateRun != Poweroff )//处理在关机过程中,预报警电池图标闪烁问题 { if( sysAlarmFlag.VoltLowest == ALARM_PREPARE ) { if( TaskSchedulerFlag.batLowPrepareFlag == TASK_FLAG_CLEAR )//电池低压预报标志 { LCDPartClear( 119 , 131 , 8 , 1 ); DisplayHeader( 0x01,0x01,119 );//电池空 TaskSchedulerFlag.batLowPrepareFlag = TASK_FLAG_WCLEAR; } else if( TaskSchedulerFlag.batLowPrepareFlag == TASK_FLAG_SET )//电池低压预报标志 { DisplayHeader( 0x01,0x01,120 );//电池一格 TaskSchedulerFlag.batLowPrepareFlag = TASK_FLAG_WSET; } } } } /************************************************************************************* * Function: DrawRegistingPicture add {} wulianwei * Object: 绘制正在注册页面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawRegistingPicture( void ) { LCDClear( GRAY0 ); // DrawBatteryDisplay();//电池 // DrawSignalDisplay();//信号 Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"正在注册" );//(5,6) } /************************************************************************************* * Function: DrawRegistFailPicture add {} wulianwei * Object: 绘制注册失败页面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawRegistFailPicture( void ) { LCDClear( GRAY0 ); // DrawBatteryDisplay();//电池 // DrawSignalDisplay();//信号 Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"注册失败" );//(5,6) } /************************************************************************************* * Function: DrawRegistSucPicture add {} wulianwei * Object: 绘制注册成功页面 * 输入: 无 * 输出: 无 * 备注: **************************************************************************************/ void DrawRegistSucPicture( void ) { LCDClear( GRAY0 ); // DrawBatteryDisplay();//电池 // DrawSignalDisplay();//信号 Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"注册成功" );//(5,6) }