DrawLCDGUI.c 157 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830
  1. /*--------------------------------------------------------------------------------------
  2. * @file DrawLCDGUI.c
  3. * @author ZhangJing
  4. * @version base on stm32f0x
  5. * @date 2015.09.11
  6. * @brief LCD GUI绘图
  7. ---------------------------------------------------------------------------------------*/
  8. #include "stm32f10x_gpio.h"
  9. #include "string.h"
  10. #include "TypeDefine.h"
  11. #include "USARTSetup.h"
  12. #include "font.h"
  13. #include "LCDSetup.h"
  14. #include "DrawLCDGUI.h"
  15. #include "History.h"
  16. #include "ADCSetup.h"
  17. #include "SystemAlarm.h"
  18. #include "FM31256.h"
  19. #include "lorawan.h"
  20. #include "FlashSetup.h"
  21. #include "Bubble_ADCSetup.h"
  22. #include "ControlSystem.h"
  23. LCDPictureType emDisplayPicture;//当前显示页,用来定位当前页,防止本页反复刷新
  24. LCDPictureType emCurrentPicture;//当前所在页,确定现在是在哪一页,用来做页面选择
  25. LCDPictureType emLockPassowrdPicture;//在进入锁定密码后保存将要进入的界面
  26. LCDPictureType emLockPassowrdFailPicture;//在锁定失败密码后保存将要进入的界面
  27. LCDPictureType emAlarmRecordPicture;//报警时要将现在在哪页记录下来
  28. LCDPictureType emAlarmRememberPicture;//报警时记录报警界面
  29. uint8_t modifyStep = 1;//通用修改步骤
  30. extern uint16_t self_adaption_Pressure; //自适应压力值
  31. extern uint16_t ces_cong;
  32. extern SpeakerWorkType speakerWorkStep;//蜂鸣器工作步骤CntlSystemStandby
  33. extern uint16_t send_cont; //数据发送次数
  34. uint16_t Version_data = 1032;//版本存储
  35. /********************************************************************************
  36. * Function: Gui_DrawPoint
  37. * Object: 画一个点
  38. * 输入: uint16_t x,uint16_t y,uint16_t Data
  39. * 输出: 无
  40. * 备注: 根据XY坐标将Data画入LCD
  41. *********************************************************************************/
  42. void Gui_DrawPoint( uint16_t x,uint16_t y,uint16_t Data )
  43. {
  44. LCDSetXY(x,y);
  45. // LCDWriteData( Data >> 8 );
  46. LCDWriteData( Data );
  47. }
  48. //画线函数,使用Bresenham 画线算法
  49. /********************************************************************************
  50. * Function: Gui_DrawLine
  51. * Object: 画一条线
  52. * 输入: uint16_t x0, uint16_t y0,uint16_t x1, uint16_t y1,uint16_t Color
  53. * 输出: 无
  54. * 备注: 1、根据XY起始坐标画一条线
  55. * 2、int dx, // difference in x's
  56. dy, // difference in y's
  57. dx2, // dx,dy * 2
  58. dy2,
  59. x_inc, // amount in pixel space to move during drawing
  60. y_inc, // amount in pixel space to move during drawing
  61. error, // the discriminant i.e. error i.e. decision variable
  62. index; // used for looping
  63. *********************************************************************************/
  64. void Gui_DrawLine( uint16_t x0, uint16_t y0,uint16_t x1, uint16_t y1,uint16_t Color )
  65. {
  66. int dx, // difference in x's
  67. dy, // difference in y's
  68. dx2, // dx,dy * 2
  69. dy2,
  70. x_inc, // amount in pixel space to move during drawing
  71. y_inc, // amount in pixel space to move during drawing
  72. error, // the discriminant i.e. error i.e. decision variable
  73. index; // used for looping
  74. LCDSetXY( x0,y0 );
  75. dx = x1 - x0;//计算x距离
  76. dy = y1 - y0;//计算y距离
  77. if ( dx >= 0 )
  78. {
  79. x_inc = 1;
  80. }
  81. else
  82. {
  83. x_inc = -1;
  84. dx = -dx;
  85. }
  86. if ( dy >= 0 )
  87. {
  88. y_inc = 1;
  89. }
  90. else
  91. {
  92. y_inc = -1;
  93. dy = -dy;
  94. }
  95. dx2 = dx << 1;
  96. dy2 = dy << 1;
  97. if ( dx > dy )//x距离大于y距离,那么每个x轴上只有一个点,每个y轴上有若干个点
  98. {
  99. //且线的点数等于x距离,以x轴递增画点
  100. // initialize error term
  101. error = dy2 - dx;
  102. // draw the line
  103. for ( index = 0; index <= dx; index++ )//要画的点数不会超过x距离
  104. {
  105. //画点
  106. Gui_DrawPoint( x0,y0,Color );
  107. // test if error has overflowed
  108. if ( error >= 0 ) //是否需要增加y坐标值
  109. {
  110. error -= dx2;
  111. // move to next line
  112. y0 += y_inc;//增加y坐标值
  113. } // end if error overflowed
  114. // adjust the error term
  115. error+=dy2;
  116. // move to the next pixel
  117. x0+=x_inc;//x坐标值每次画点后都递增1
  118. } // end for
  119. } // end if |slope| <= 1
  120. else//y轴大于x轴,则每个y轴上只有一个点,x轴若干个点
  121. {
  122. //以y轴为递增画点
  123. // initialize error term
  124. error = dx2 - dy;
  125. // draw the line
  126. for (index=0; index <= dy; index++)
  127. {
  128. // set the pixel
  129. Gui_DrawPoint(x0,y0,Color);
  130. // test if error overflowed
  131. if (error >= 0)
  132. {
  133. error-=dy2;
  134. // move to next line
  135. x0+=x_inc;
  136. } // end if error overflowed
  137. // adjust the error term
  138. error+=dx2;
  139. // move to the next pixel
  140. y0+=y_inc;
  141. } // end for
  142. } // end else |slope| > 1
  143. }
  144. /********************************************************************************
  145. * Function: Gui_DrawFont_GBK8
  146. * Object: 写字号为8字符的函数
  147. * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s
  148. * 输出: 无
  149. * 备注: 根据XY坐标将所需字符按8号字大小写在LCD上
  150. *********************************************************************************/
  151. void Gui_DrawFont_GBK8( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s )
  152. {
  153. unsigned short k,x0;
  154. x0 = x;
  155. while( *s )
  156. {
  157. if( ( *s ) < 128 )
  158. {
  159. k = *s;
  160. if ( k == 13 )
  161. {
  162. x = x0;
  163. //y += 16;
  164. }
  165. else
  166. {
  167. for ( k = 0;k < asc12_num;k++ )
  168. {
  169. if ( asc8[k].Index[0] == *( s ))
  170. {
  171. DisplayGraphicsGBK8_8( x , y , (uint8_t *)asc8[k].Msk );
  172. break;
  173. }
  174. }
  175. }
  176. // x -= 5;//反向显示
  177. x += 5;//正向显示
  178. }
  179. s++;
  180. }
  181. }
  182. /********************************************************************************
  183. * Function: Gui_DrawFont_GBK8Number
  184. * Object: 写字号为8数字的函数
  185. * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s
  186. * 输出: 无
  187. * 备注: 根据XY坐标将所需数字按8号字大小写在LCD上
  188. *********************************************************************************/
  189. void Gui_DrawFont_GBK8Number( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s )
  190. {
  191. unsigned short k,x0;
  192. x0 = x;
  193. while( *s )
  194. {
  195. if( ( *s ) < 128 )
  196. {
  197. k = *s;
  198. if ( k == 13 )
  199. {
  200. x = x0;
  201. //y += 16;
  202. }
  203. else
  204. {
  205. for ( k = 0;k < asc12_num;k++ )
  206. {
  207. if ( asc8[k].Index[0] == *( s ))
  208. {
  209. DisplayGraphicsGBK8_8( x , y , (uint8_t *)asc8[k].Msk );
  210. break;
  211. }
  212. }
  213. }
  214. // x -= 5;//反向显示
  215. x += 6;//正向显示
  216. }
  217. s++;
  218. }
  219. }
  220. /********************************************************************************
  221. * Function: Gui_DrawFont_GBK12
  222. * Object: 写字号为12字符的函数
  223. * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s
  224. * 输出: 无
  225. * 备注: 根据XY坐标将所需字符按12号字大小写在LCD上
  226. *********************************************************************************/
  227. void Gui_DrawFont_GBK12( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s )
  228. {
  229. unsigned short k,x0;
  230. x0 = x;
  231. while( *s )
  232. {
  233. if( ( *s ) < 128 )
  234. {
  235. k = *s;
  236. if ( k == 13 )
  237. {
  238. x = x0;
  239. //y += 16;
  240. }
  241. else
  242. {
  243. for ( k = 0;k < asc12_num;k++ )
  244. {
  245. if ( asc12[k].Index[0] == *( s ))
  246. {
  247. DisplayGraphicsGBK8_12( x , y , (uint8_t *)asc12[k].Msk );
  248. break;
  249. }
  250. }
  251. }
  252. s++;
  253. // x -= 6;//反向显示
  254. x += 6;//正向显示
  255. }
  256. else
  257. {
  258. for ( k = 0;k < hz12_num;k++ )
  259. {
  260. if (( hz12[k].Index[0] == *( s )) && ( hz12[k].Index[1] == *( s + 1 )))
  261. {
  262. DisplayGraphicsGBK12( x,y,(uint8_t *)hz12[k].Msk );
  263. break;
  264. }
  265. }
  266. s += 2;
  267. // x -= 12;//反向显示
  268. x += 12;//正向显示
  269. }
  270. }
  271. }
  272. /********************************************************************************
  273. * Function: Gui_DrawFont_GBK16
  274. * Object: 写字号为16字符的函数
  275. * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s
  276. * 输出: 无
  277. * 备注: 根据XY坐标将所需字符按16号字大小写在LCD上
  278. *********************************************************************************/
  279. void Gui_DrawFont_GBK16( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s )
  280. {
  281. unsigned short k,x0;
  282. x0 = x;
  283. while( *s )
  284. {
  285. if( ( *s ) < 128 )
  286. {
  287. k = *s;
  288. if ( k == 13 )
  289. {
  290. x = x0;
  291. y += 16;
  292. }
  293. else
  294. {
  295. for ( k = 0;k < asc16_num;k++ )
  296. {
  297. if ( asc16[k].Index[0] == *( s ))
  298. {
  299. DisplayGraphicsGBK8_16( x , y , (uint8_t *)asc16[k].Msk );
  300. break;
  301. }
  302. }
  303. }
  304. s++;
  305. // x -= 8;//反向显示
  306. x += 8;//正向显示
  307. }
  308. else
  309. {
  310. for ( k = 0;k < hz16_num;k++ )
  311. {
  312. if (( hz16[k].Index[0] == *( s )) && ( hz16[k].Index[1] == *( s + 1 )))
  313. {
  314. DisplayGraphicsGBK16( x,y,(uint8_t *)hz16[k].Msk );
  315. break;
  316. }
  317. }
  318. s += 2;
  319. // x -= 16;//反向显示
  320. x += 16;//正向显示
  321. }
  322. }
  323. }
  324. /********************************************************************************
  325. * Function: Gui_DrawFont_GBK24
  326. * Object: 写字号为24字符的函数
  327. * 输入: uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s
  328. * 输出: 无
  329. * 备注: 根据XY坐标将所需字符按24号字大小写在LCD上
  330. *********************************************************************************/
  331. void Gui_DrawFont_GBK24( uint16_t x, uint16_t y, uint16_t fc, uint16_t bc, uint8_t *s )
  332. {
  333. unsigned short k;
  334. while( *s )
  335. {
  336. if( *s < 0x80 )
  337. {
  338. k = *s;
  339. if( k > 32 )
  340. {
  341. k -= 32;
  342. }
  343. else
  344. {
  345. k = 0;
  346. }
  347. //DisplayGraphicsGBK8( x,y,(uint8_t *)asc16[ k * 16 ]);
  348. s++;
  349. x += 8;
  350. }
  351. else
  352. {
  353. for ( k = 0;k < hz24_num;k++ )
  354. {
  355. if (( hz24[k].Index[0] == *( s )) && ( hz24[k].Index[1] == *( s + 1 )))//用汉字的ASCII码进行查找符合条件的汉字
  356. {
  357. DisplayGraphicsGBK24( x,y,(uint8_t *)hz24[k].Msk );
  358. }
  359. }
  360. s += 2;
  361. x -= 24;//反向显示
  362. // x += 24;//正向显示
  363. }
  364. }
  365. }
  366. /*************************************************************************************
  367. * Function: HexToASCII
  368. * Object: 将十六进制的数转换为ASCII码
  369. * 输入: uint32_t data
  370. * uint8_t* returnData 以字节形式返回ASCII
  371. * 输出:
  372. * 备注: uint8_t tempData = 0;临时变量
  373. **************************************************************************************/
  374. void HexToASCII( uint8_t data , uint8_t* returnData )
  375. {
  376. uint8_t tempData = 0;
  377. tempData = (uint8_t)( ( data & 0xf0 ) >> 4 );//高4位转换
  378. if( tempData > 0 && tempData <= 9 )
  379. {
  380. tempData = 0x30 + tempData;
  381. }
  382. else if( tempData >= 0x0a && tempData <= 0x0f )
  383. {
  384. tempData = 0x41 + tempData - 10;
  385. }
  386. else
  387. {
  388. tempData = 0x30;
  389. }
  390. *returnData = tempData;
  391. returnData++;
  392. tempData = (uint8_t)( data & 0x0f );//低4位转换
  393. if( tempData > 0 && tempData <= 9 )
  394. {
  395. tempData = 0x30 + tempData;
  396. }
  397. else if( tempData >= 0x0a && tempData <= 0x0f )
  398. {
  399. tempData = 0x41 + tempData - 10;
  400. }
  401. else
  402. {
  403. tempData =0x30;
  404. }
  405. *returnData = tempData;
  406. }
  407. /*************************************************************************************
  408. * Function: DecimalToASCII
  409. * Object: 将十进制的数转换为ASCII码
  410. * 输入: uint32_t data
  411. * uint8_t* returnData 以字节形式返回ASCII
  412. * uint8_t decQty 十进制数位数
  413. * 输出:
  414. * 备注: 最多可以转换10位十进制数
  415. **************************************************************************************/
  416. void DecimalToASCII( uint64_t data,uint8_t* returnData,uint8_t decQty )
  417. {
  418. switch( decQty )
  419. {
  420. case 1:
  421. returnData[0] = (uint8_t)(data + 0x30);
  422. returnData[1] = 0;
  423. returnData[2] = 0;
  424. returnData[3] = 0;
  425. returnData[4] = 0;
  426. returnData[5] = 0;
  427. returnData[6] = 0;
  428. returnData[7] = 0;
  429. returnData[8] = 0;
  430. returnData[9] = 0;
  431. break;
  432. case 2:
  433. returnData[0] = (uint8_t)(data / 10 + 0x30);
  434. returnData[1] = (uint8_t)(data % 10 + 0x30);
  435. returnData[2] = 0;
  436. returnData[3] = 0;
  437. returnData[4] = 0;
  438. returnData[5] = 0;
  439. returnData[6] = 0;
  440. returnData[7] = 0;
  441. returnData[8] = 0;
  442. returnData[9] = 0;
  443. break;
  444. case 3:
  445. returnData[0] = (uint8_t)(data / 100 + 0x30);
  446. returnData[1] = (uint8_t)(data % 100 / 10 + 0x30);
  447. returnData[2] = (uint8_t)(data % 10 + 0x30);
  448. returnData[3] = 0;
  449. returnData[4] = 0;
  450. returnData[5] = 0;
  451. returnData[6] = 0;
  452. returnData[7] = 0;
  453. returnData[8] = 0;
  454. returnData[9] = 0;
  455. break;
  456. case 4:
  457. returnData[0] = (uint8_t)(data / 1000 + 0x30);
  458. returnData[1] = (uint8_t)(data % 1000 / 100 + 0x30);
  459. returnData[2] = (uint8_t)(data % 100 / 10 + 0x30);
  460. returnData[3] = (uint8_t)(data % 10 + 0x30);
  461. returnData[4] = 0;
  462. returnData[5] = 0;
  463. returnData[6] = 0;
  464. returnData[7] = 0;
  465. returnData[8] = 0;
  466. returnData[9] = 0;
  467. break;
  468. case 5:
  469. returnData[0] = (uint8_t)(data / 10000 + 0x30);
  470. returnData[1] = (uint8_t)(data % 10000 / 1000 + 0x30);
  471. returnData[2] = (uint8_t)(data % 1000 / 100 + 0x30);
  472. returnData[3] = (uint8_t)(data % 100 / 10 + 0x30);
  473. returnData[4] = (uint8_t)(data % 10 + 0x30);
  474. returnData[5] = 0;
  475. returnData[6] = 0;
  476. returnData[7] = 0;
  477. returnData[8] = 0;
  478. returnData[9] = 0;
  479. break;
  480. case 6:
  481. returnData[0] = (uint8_t)(data / 100000 + 0x30);
  482. returnData[1] = (uint8_t)(data % 100000 / 10000 + 0x30);
  483. returnData[2] = (uint8_t)(data % 10000 / 1000 + 0x30);
  484. returnData[3] = (uint8_t)(data % 1000 / 100 + 0x30);
  485. returnData[4] = (uint8_t)(data % 100 / 10 + 0x30);
  486. returnData[5] = (uint8_t)(data % 10 + 0x30);
  487. returnData[6] = 0;
  488. returnData[7] = 0;
  489. returnData[8] = 0;
  490. returnData[9] = 0;
  491. break;
  492. case 7:
  493. returnData[0] = (uint8_t)(data / 1000000 + 0x30);
  494. returnData[1] = (uint8_t)(data % 1000000 / 100000 + 0x30);
  495. returnData[2] = (uint8_t)(data % 100000 / 10000 + 0x30);
  496. returnData[3] = (uint8_t)(data % 10000 / 1000 + 0x30);
  497. returnData[4] = (uint8_t)(data % 1000 / 100 + 0x30);
  498. returnData[5] = (uint8_t)(data % 100 / 10 + 0x30);
  499. returnData[6] = (uint8_t)(data % 10 + 0x30);
  500. returnData[7] = 0;
  501. returnData[8] = 0;
  502. returnData[9] = 0;
  503. break;
  504. case 8:
  505. returnData[0] = (uint8_t)(data / 10000000 + 0x30);
  506. returnData[1] = (uint8_t)(data % 10000000 / 1000000 + 0x30);
  507. returnData[2] = (uint8_t)(data % 1000000 / 100000 + 0x30);
  508. returnData[3] = (uint8_t)(data % 100000 / 10000 + 0x30);
  509. returnData[4] = (uint8_t)(data % 10000 / 1000 + 0x30);
  510. returnData[5] = (uint8_t)(data % 1000 / 100 + 0x30);
  511. returnData[6] = (uint8_t)(data % 100 / 10 + 0x30);
  512. returnData[7] = (uint8_t)(data % 10 + 0x30);
  513. returnData[8] = 0;
  514. returnData[9] = 0;
  515. break;
  516. case 9:
  517. returnData[0] = (uint8_t)(data / 100000000 + 0x30);
  518. returnData[1] = (uint8_t)(data % 100000000 / 10000000 + 0x30);
  519. returnData[2] = (uint8_t)(data % 10000000 / 1000000 + 0x30);
  520. returnData[3] = (uint8_t)(data % 1000000 / 100000 + 0x30);
  521. returnData[4] = (uint8_t)(data % 100000 / 10000 + 0x30);
  522. returnData[5] = (uint8_t)(data % 10000 / 1000 + 0x30);
  523. returnData[6] = (uint8_t)(data % 1000 / 100 + 0x30);
  524. returnData[7] = (uint8_t)(data % 100 / 10 + 0x30);
  525. returnData[8] = (uint8_t)(data % 10 + 0x30);
  526. returnData[9] = 0;
  527. break;
  528. case 10:
  529. returnData[0] = (uint8_t)(data / 1000000000 + 0x30);
  530. returnData[1] = (uint8_t)(data % 1000000000 / 100000000 + 0x30);
  531. returnData[2] = (uint8_t)(data % 100000000 / 10000000 + 0x30);
  532. returnData[3] = (uint8_t)(data % 10000000 / 1000000 + 0x30);
  533. returnData[4] = (uint8_t)(data % 1000000 / 100000 + 0x30);
  534. returnData[5] = (uint8_t)(data % 100000 / 10000 + 0x30);
  535. returnData[6] = (uint8_t)(data % 10000 / 1000 + 0x30);
  536. returnData[7] = (uint8_t)(data % 1000 / 100 + 0x30);
  537. returnData[8] = (uint8_t)(data % 100 / 10 + 0x30);
  538. returnData[9] = (uint8_t)(data % 10 + 0x30);
  539. break;
  540. default:break;
  541. }
  542. }
  543. /*************************************************************************************
  544. * Function: DrawPhoneDisplay
  545. * Object: 绘制呼叫电话标志
  546. * 输入: 无
  547. * 输出: 无
  548. * 备注: 在有呼叫的情况下显示
  549. **************************************************************************************/
  550. void DrawPhoneDisplay( void )
  551. {
  552. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  553. {
  554. DisplayHeader(0xff,0xff,34);//呼叫
  555. }
  556. else
  557. {
  558. DisplayHeader(0x00,0x00,34);//呼叫
  559. }
  560. }
  561. /*************************************************************************************
  562. * Function: DrawPauseDisplay
  563. * Object: 绘制暂停标志
  564. * 输入: 无
  565. * 输出: 无
  566. * 备注: 在有呼叫的情况下显示
  567. **************************************************************************************/
  568. void DrawPauseDisplay( void )
  569. {
  570. if( realTimeData.stateRun == Pause )
  571. {
  572. DisplayHeader(0xff,0xff,81);//暂停
  573. }
  574. else
  575. {
  576. DisplayHeader(0x00,0x00,81);//暂停
  577. }
  578. }
  579. /*************************************************************************************
  580. * Function: DrawLockDisplay
  581. * Object: 绘制上锁标志
  582. * 输入: 无
  583. * 输出: 无
  584. * 备注: 在有呼叫的情况下显示
  585. **************************************************************************************/
  586. void DrawLockDisplay( void )
  587. {
  588. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  589. {
  590. DisplayHeader(0xff,0xff,82);//锁2
  591. }
  592. else
  593. {
  594. DisplayHeader(0x00,0x00,82);//清锁2
  595. }
  596. }
  597. /*************************************************************************************
  598. * Function: DrawSignalDisplay
  599. * Object: 绘制信号显示
  600. * 输入: 无
  601. * 输出: 无
  602. * 备注: 在有网络的情况下显示
  603. **************************************************************************************/
  604. void DrawSignalDisplay( void )
  605. {
  606. // if( ( EngineeringModeValue.networkState == ENGINEERINGMODE_ON ) && ( TaskSchedulerFlag.zigbeeInNetFlag == TASK_FLAG_SET ) )
  607. if( EngineeringModeValue.networkState == ENGINEERINGMODE_ON && TaskSchedulerFlag.NET_ONLINE_FLAG == TASK_FLAG_SET) //update by wulianwei
  608. {
  609. DisplayHeader(0xff,0xff,108);//信号
  610. }
  611. else
  612. {
  613. DisplayHeader(0x00,0x00,108);//信号
  614. }
  615. }
  616. /*************************************************************************************
  617. * Function: DrawSilenceDisplay
  618. * Object: 绘制静音显示
  619. * 输入: 无
  620. * 输出: 无
  621. * 备注: 在有静音设置时显示
  622. **************************************************************************************/
  623. void DrawSilenceDisplay( void )
  624. {
  625. if( ( EngineeringModeValue.silenceState == ENGINEERINGMODE_ON ) || ( TaskSchedulerFlag.silenceFlag == TASK_FLAG_SET ))
  626. {
  627. DisplayHeader(0xff,0xff,41);//静音
  628. DisplayHeader(0xff,0xff,42);//静音
  629. }
  630. else
  631. {
  632. DisplayHeader(0,0,41);//静音
  633. DisplayHeader(0,0,42);//静音
  634. }
  635. }
  636. /*************************************************************************************
  637. * Function: DrawSignalDisplay
  638. * Object: 绘电池显示
  639. * 输入: 无
  640. * 输出: 无
  641. * 备注: 根据电池电量分出3个区,显示电池格数
  642. **************************************************************************************/
  643. void DrawBatteryDisplay( void )
  644. {
  645. //2018/1/31 增加电池图标刷新标志
  646. u8 BatteryBuf = 0;
  647. if((BatteryBuf != realTimeData.batteryVolt) && (TaskSchedulerFlag.batteryVoltHeaderFlag == TASK_FLAG_SET))
  648. {
  649. BatteryBuf = realTimeData.batteryVolt;
  650. TaskSchedulerFlag.batteryVoltHeaderFlag = TASK_FLAG_CLEAR;
  651. }
  652. if( sysAlarmFlag.VoltLowest != ALARM_PREPARE )
  653. {
  654. LCDPartClear( 119 , 131 , 8 , 1 );
  655. if( realTimeData.batteryVolt < BATTERY_VOLT_LIMIT1 )
  656. {
  657. DisplayHeader( 0x01,0x01,119 );//电池空
  658. }
  659. else if( ( realTimeData.batteryVolt >= BATTERY_VOLT_LIMIT1 ) && ( realTimeData.batteryVolt < BATTERY_VOLT_LIMIT2 ) )
  660. {
  661. DisplayHeader( 0x01,0x01,120 );//电池一格
  662. }
  663. else if( ( realTimeData.batteryVolt >= BATTERY_VOLT_LIMIT2 ) && ( realTimeData.batteryVolt < BATTERY_VOLT_LIMIT3 ) )
  664. {
  665. DisplayHeader( 0x01,0x01,121 );//电池两格
  666. }
  667. else if( realTimeData.batteryVolt >= BATTERY_VOLT_LIMIT3 )
  668. {
  669. DisplayHeader( 0x01,0x01,122 );//电池满格
  670. }
  671. }
  672. }
  673. /*************************************************************************************
  674. * Function: DrawScheduleDisplay
  675. * Object: 运行过程中进度条更新循环
  676. * 输入: 无
  677. * 输出: 无
  678. * 备注: 在有运行中的情况下循环显示,暂停显示
  679. **************************************************************************************/
  680. void DrawScheduleDisplay(void)
  681. {
  682. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  683. if(TaskSchedulerFlag.LcdLogoFlag == TASK_FLAG_SET)
  684. {
  685. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  686. {
  687. DisplayHeader(0xff,0xff,82);//锁2
  688. }
  689. else
  690. {
  691. DisplayHeader(0x00,0x00,82);//清锁2
  692. }
  693. if( realTimeData.stateRun == Pause )
  694. {
  695. DisplayHeader(0xff,0xff,81);//暂停
  696. }
  697. else
  698. {
  699. DisplayHeader(0x00,0x00,81);//暂停
  700. }
  701. TaskSchedulerFlag.LcdLogoFlag = TASK_FLAG_CLEAR;
  702. }
  703. if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET )
  704. {
  705. switch( modifyStep )
  706. {
  707. case 1:
  708. DisplayHeader(0x00,0x00,8);//进度条
  709. DisplayHeader(0xff,0xff,5);//进度条
  710. modifyStep = 2;
  711. break;
  712. case 2:
  713. DisplayHeader(0xff,0xff,6);//进度条
  714. modifyStep = 3;
  715. break;
  716. case 3:
  717. DisplayHeader(0xff,0xff,7);//进度条
  718. modifyStep = 4;
  719. break;
  720. case 4:
  721. DisplayHeader(0xff,0xff,8);//进度条
  722. modifyStep = 1;
  723. break;
  724. default:break;
  725. }
  726. TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR;
  727. }
  728. if(emSysWorkStep ==EnterRunMain)
  729. {
  730. if(TaskSchedulerFlag.lcdFlashFlag1 == TASK_FLAG_SET)
  731. {
  732. if(emCurrentPicture == RunPCADisp)
  733. {
  734. if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET )
  735. {
  736. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"无效次数" );
  737. DecimalToASCII( realTimeData.invalidCount,tempBuf,3 );
  738. }
  739. else
  740. {
  741. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"有效次数" );
  742. DecimalToASCII( realTimeData.validCount,tempBuf,3 );
  743. }
  744. if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET)//
  745. {
  746. TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT;
  747. Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0," ");
  748. }
  749. else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR))
  750. {
  751. TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR;
  752. Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0,tempBuf );
  753. }
  754. }
  755. else if(emCurrentPicture == RunMainDisp)
  756. {
  757. if( EngineeringModeValue.pressure_switch == 1) //显示关闭的话,显示正常的参数
  758. {
  759. if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET )
  760. {
  761. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"无效" );
  762. DecimalToASCII( realTimeData.invalidCount,tempBuf,3 );
  763. }
  764. else
  765. {
  766. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"有效" );
  767. DecimalToASCII( realTimeData.validCount,tempBuf,3 );
  768. }
  769. if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET)
  770. {
  771. TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT;
  772. Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0," ");
  773. }
  774. else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET ))
  775. {
  776. TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR;
  777. Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf );
  778. }
  779. }
  780. }
  781. TaskSchedulerFlag.lcdFlashFlag1 = TASK_FLAG_CLEAR;
  782. }
  783. if(TaskSchedulerFlag.PCATimerFlashFlag1 == TASK_FLAG_SET)
  784. {
  785. if( ( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_SET ) )//锁时数值要闪烁
  786. {
  787. TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_WAIT;
  788. Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0," ");
  789. }
  790. else if((( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_WSET ))
  791. ||(TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_CLEAR))
  792. {
  793. TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_CLEAR;
  794. DecimalToASCII( realTimeData.lockTime,tempBuf,2 );
  795. Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf );
  796. }
  797. TaskSchedulerFlag.PCATimerFlashFlag1 = TASK_FLAG_CLEAR;
  798. }
  799. }
  800. }
  801. /*************************************************************************************
  802. * Function: DrawStartupPicture
  803. * Object: 绘制开机画面
  804. * 输入: 无
  805. * 输出: 无
  806. * 备注:
  807. **************************************************************************************/
  808. void DrawStartupPicture( void )
  809. {
  810. LCDClear( GRAY0 );
  811. // DrawBatteryDisplay();//电池
  812. // DrawSignalDisplay();//信号
  813. Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"改善医疗体验" );//(5,6)
  814. Gui_DrawFont_GBK16( 20,2,BLACK,GRAY0,"呵护生命健康" );//(25,2)
  815. }
  816. /*************************************************************************************
  817. * Function: DrawHistoryFirstPicture
  818. * Object: 绘制历史数据第一画面
  819. * 输入: 无
  820. * 输出: 无
  821. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将tempInputDose转换成数组进行写操作
  822. uint8_t tempReadIndex = 0;临时索引变量
  823. uint16_t tempInputDose = 0; 临时变量计算所需显示的数字
  824. **************************************************************************************/
  825. void DrawHistoryFirstPicture( void )
  826. {
  827. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  828. uint8_t tempReadIndex = 0;
  829. uint16_t tempInputDose = 0;
  830. LCDClear( GRAY0 );
  831. DrawBatteryDisplay();//电池
  832. DrawSignalDisplay();//信号
  833. DrawSilenceDisplay();//静音
  834. DisplayHeader(0xff,0xff,23);//历史数据
  835. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"已输" );
  836. tempInputDose = historyRecord.inputed / 10;
  837. DecimalToASCII( tempInputDose,tempBuf,3 );
  838. Gui_DrawFont_GBK12( 30,7,BLACK,GRAY0,tempBuf );
  839. Gui_DrawFont_GBK12( 48,7,BLACK,GRAY0,"." );
  840. tempInputDose = historyRecord.inputed % 10;
  841. DecimalToASCII( tempInputDose,tempBuf,1 );
  842. Gui_DrawFont_GBK12( 54,7,BLACK,GRAY0,tempBuf );
  843. Gui_DrawFont_GBK12( 63,7,BLACK,GRAY0,"ml" );
  844. if( historyRecordQTY == 0 )
  845. {
  846. tempReadIndex = 0;
  847. FackreadIndex = 0;
  848. }
  849. else
  850. {
  851. // tempReadIndex = historyRecord.readIndex + 1;
  852. tempReadIndex = FackreadIndex ;
  853. }
  854. DecimalToASCII( tempReadIndex,tempBuf,3 );
  855. Gui_DrawFont_GBK12( 86,7,BLACK,GRAY0,tempBuf );
  856. Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,"/" );
  857. DecimalToASCII( FackhistoryRecordQTY,tempBuf,3 );
  858. Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,tempBuf );
  859. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"总量" );
  860. DecimalToASCII( historyRecord.totalDose,tempBuf,3 );
  861. Gui_DrawFont_GBK12( 31,5,BLACK,GRAY0,tempBuf );
  862. Gui_DrawFont_GBK12( 51,5,BLACK,GRAY0,"ml" );
  863. Gui_DrawFont_GBK12( 64,5,BLACK,GRAY0,"首次量" );
  864. DecimalToASCII( historyRecord.firstDose,tempBuf,2 );
  865. Gui_DrawFont_GBK12( 102,5,BLACK,GRAY0,tempBuf );
  866. Gui_DrawFont_GBK12( 119,5,BLACK,GRAY0,"ml" );
  867. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"持续" );
  868. tempInputDose = historyRecord.continueDose / 10;
  869. DecimalToASCII( tempInputDose,tempBuf,2 );
  870. Gui_DrawFont_GBK12( 28,3,BLACK,GRAY0,tempBuf );
  871. Gui_DrawFont_GBK8( 40,3,BLACK,GRAY0,"." );
  872. tempInputDose = historyRecord.continueDose % 10;
  873. DecimalToASCII( tempInputDose,tempBuf,1 );
  874. Gui_DrawFont_GBK12( 45,3,BLACK,GRAY0,tempBuf );
  875. Gui_DrawFont_GBK12( 51,3,BLACK,GRAY0,"ml" );
  876. Gui_DrawFont_GBK12( 64,3,BLACK,GRAY0,"追加" );
  877. tempInputDose = historyRecord.superaddition / 10;
  878. DecimalToASCII( tempInputDose,tempBuf,2 );
  879. Gui_DrawFont_GBK12( 90,3,BLACK,GRAY0,tempBuf );
  880. Gui_DrawFont_GBK8( 102,3,BLACK,GRAY0,"." );
  881. tempInputDose = historyRecord.superaddition % 10;
  882. DecimalToASCII( tempInputDose,tempBuf,1 );
  883. Gui_DrawFont_GBK12( 107,3,BLACK,GRAY0,tempBuf );
  884. Gui_DrawFont_GBK12( 119,3,BLACK,GRAY0,"ml" );
  885. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"锁时" );
  886. DecimalToASCII( historyRecord.lockTime,tempBuf,2 );
  887. Gui_DrawFont_GBK12( 30,1,BLACK,GRAY0,tempBuf );
  888. Gui_DrawFont_GBK12( 45,1,BLACK,GRAY0,"min" );
  889. Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,"极限值" );//57
  890. DecimalToASCII( historyRecord.limitDose,tempBuf,3 );
  891. Gui_DrawFont_GBK12( 100,1,BLACK,GRAY0,tempBuf );
  892. Gui_DrawFont_GBK12( 119,1,BLACK,GRAY0,"ml" );
  893. }
  894. /*************************************************************************************
  895. * Function: DrawHistorySecondPicture
  896. * Object: 绘制历史数据第二画面
  897. * 输入: 无
  898. * 输出: 无
  899. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  900. **************************************************************************************/
  901. void DrawHistorySecondPicture( void )
  902. {
  903. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  904. LCDClear( GRAY0 );
  905. DrawBatteryDisplay();//电池
  906. DrawSignalDisplay();//信号
  907. DrawSilenceDisplay();//静音
  908. DisplayHeader(0xff,0xff,23);//历史数据
  909. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"追加有效次数" );
  910. DecimalToASCII( historyRecord.additionalNum1,tempBuf,3 );
  911. Gui_DrawFont_GBK12( 82,7,BLACK,GRAY0,tempBuf );
  912. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"追加无效次数" );
  913. DecimalToASCII( historyRecord.additionalNum2,tempBuf,3 );
  914. Gui_DrawFont_GBK12( 82,5,BLACK,GRAY0,tempBuf );
  915. DecimalToASCII( historyRecord.stopTimeMonth,tempBuf,2 );
  916. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,tempBuf );
  917. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"月" );
  918. DecimalToASCII( historyRecord.stopTimeDate,tempBuf,2 );
  919. Gui_DrawFont_GBK12( 28,3,BLACK,GRAY0,tempBuf );
  920. Gui_DrawFont_GBK12( 40,3,BLACK,GRAY0,"日" );
  921. DecimalToASCII( historyRecord.stopTimeHour,tempBuf,2 );
  922. Gui_DrawFont_GBK12( 52,3,BLACK,GRAY0,tempBuf );
  923. Gui_DrawFont_GBK12( 64,3,BLACK,GRAY0,":" );
  924. DecimalToASCII( historyRecord.stopTimeMinute,tempBuf,2 );
  925. Gui_DrawFont_GBK12( 70,3,BLACK,GRAY0,tempBuf );
  926. Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"关机" );
  927. /* Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"关机" );*/
  928. // if( historyRecord.closeDeviceState == 1 )
  929. // {
  930. // Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"输液结束" );
  931. // }
  932. // else
  933. // {
  934. // Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"关机" );
  935. // }
  936. DecimalToASCII( historyRecord.alarmTimeMonth,tempBuf,2 );
  937. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,tempBuf );
  938. Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,"月" );
  939. DecimalToASCII( historyRecord.alarmTimeDate,tempBuf,2 );
  940. Gui_DrawFont_GBK12( 28,1,BLACK,GRAY0,tempBuf );
  941. Gui_DrawFont_GBK12( 40,1,BLACK,GRAY0,"日" );
  942. DecimalToASCII( historyRecord.alarmTimeHour,tempBuf,2 );
  943. Gui_DrawFont_GBK12( 52,1,BLACK,GRAY0,tempBuf );
  944. Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,":" );
  945. DecimalToASCII( historyRecord.alarmTimeMinute,tempBuf,2 );
  946. Gui_DrawFont_GBK12( 70,1,BLACK,GRAY0,tempBuf );
  947. switch( historyRecord.alarmType )
  948. {
  949. case 1:
  950. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"机械故障" );
  951. break;
  952. case 2:
  953. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"堵塞" );
  954. break;
  955. case 3:
  956. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"极限" );
  957. break;
  958. case 4:
  959. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"气泡无液" );
  960. break;
  961. case 5:
  962. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"未装药盒" );
  963. break;
  964. case 6:
  965. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"电量耗尽" );
  966. break;
  967. case 7:
  968. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"管道脱落" );
  969. break;
  970. case 8:
  971. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"输液结束" );
  972. break;
  973. default:
  974. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,"无报警" );
  975. break;
  976. }
  977. }
  978. /*************************************************************************************
  979. * Function: DrawDeviceIDPicture
  980. * Object: 绘制设备ID画面
  981. * 输入: 无
  982. * 输出: 无
  983. * 备注: uint8_t tempBuf[2];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  984. **************************************************************************************/
  985. void DrawDeviceIDPicture( void )
  986. {
  987. uint8_t tempBuf[2] = { 0x30,0x30 };
  988. uint8_t i;
  989. uint32_t dat_buf=0,decimals_data;
  990. LCDClear( GRAY0 );
  991. DrawBatteryDisplay();//电池
  992. DrawSignalDisplay();//信号
  993. DrawSilenceDisplay();//静音
  994. Gui_DrawFont_GBK12( 6,6,BLACK,GRAY0,"ID:" );
  995. for( i = 0 ; i < 8 ; i++ )
  996. {
  997. HexToASCII( setParamInfo.deviceID[i],tempBuf );
  998. Gui_DrawFont_GBK12( ( 30 + i * 12 ), 6, BLACK,GRAY0, tempBuf );
  999. }
  1000. Gui_DrawFont_GBK12( 6,3,BLACK,GRAY0,"总剩余量:" );
  1001. dat_buf=((150000-realTimeData.InputTotalDose)/10);
  1002. if( (dat_buf /10000) != 0)
  1003. {
  1004. DecimalToASCII(dat_buf,tempBuf,5 );
  1005. Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf );
  1006. Gui_DrawFont_GBK12( 90,3,BLACK,GRAY0,"." );
  1007. decimals_data=((150000-realTimeData.InputTotalDose)%10);
  1008. DecimalToASCII( decimals_data,tempBuf,1 );
  1009. Gui_DrawFont_GBK12( 94,3,BLACK,GRAY0,tempBuf );
  1010. Gui_DrawFont_GBK12( 100,3,BLACK,GRAY0,"ml" );
  1011. }
  1012. else if( (dat_buf /1000) != 0)
  1013. {
  1014. DecimalToASCII(dat_buf,tempBuf,4 );
  1015. Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf );
  1016. Gui_DrawFont_GBK12( 84,3,BLACK,GRAY0,"." );
  1017. decimals_data=((150000-realTimeData.InputTotalDose)%10);
  1018. DecimalToASCII( decimals_data,tempBuf,1 );
  1019. Gui_DrawFont_GBK12( 88,3,BLACK,GRAY0,tempBuf );
  1020. Gui_DrawFont_GBK12( 94,3,BLACK,GRAY0,"ml" );
  1021. }
  1022. else if( (dat_buf /100) != 0)
  1023. {
  1024. DecimalToASCII(dat_buf,tempBuf,3 );
  1025. Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf );
  1026. Gui_DrawFont_GBK12( 78,3,BLACK,GRAY0,"." );
  1027. decimals_data=((150000-realTimeData.InputTotalDose)%10);
  1028. DecimalToASCII( decimals_data,tempBuf,1 );
  1029. Gui_DrawFont_GBK12( 82,3,BLACK,GRAY0,tempBuf );
  1030. Gui_DrawFont_GBK12( 88,3,BLACK,GRAY0,"ml" );
  1031. }
  1032. else if( (dat_buf /10) != 0)
  1033. {
  1034. DecimalToASCII(dat_buf,tempBuf,2 );
  1035. Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf );
  1036. Gui_DrawFont_GBK12( 72,3,BLACK,GRAY0,"." );
  1037. decimals_data=((150000-realTimeData.InputTotalDose)%10);
  1038. DecimalToASCII( decimals_data,tempBuf,1 );
  1039. Gui_DrawFont_GBK12( 76,3,BLACK,GRAY0,tempBuf );
  1040. Gui_DrawFont_GBK12( 82,3,BLACK,GRAY0,"ml" );
  1041. }
  1042. else
  1043. {
  1044. DecimalToASCII(dat_buf,tempBuf,1 );
  1045. Gui_DrawFont_GBK12( 60,3,BLACK,GRAY0,tempBuf );
  1046. Gui_DrawFont_GBK12( 66,3,BLACK,GRAY0,"." );
  1047. decimals_data=((150000-realTimeData.InputTotalDose)%10);
  1048. DecimalToASCII( decimals_data,tempBuf,1 );
  1049. Gui_DrawFont_GBK12( 70,3,BLACK,GRAY0,tempBuf );
  1050. Gui_DrawFont_GBK12( 76,3,BLACK,GRAY0,"ml" );
  1051. }
  1052. Gui_DrawFont_GBK12( 6,1,BLACK,GRAY0,"版本:V" );
  1053. DecimalToASCII((Version_data/1000),tempBuf,1 );
  1054. Gui_DrawFont_GBK12( 48,1,BLACK,GRAY0,tempBuf );
  1055. Gui_DrawFont_GBK12( 54,1,BLACK,GRAY0,"." );
  1056. DecimalToASCII(((Version_data%1000)/100),tempBuf,1 );
  1057. Gui_DrawFont_GBK12( 60,1,BLACK,GRAY0,tempBuf );
  1058. Gui_DrawFont_GBK12( 66,1,BLACK,GRAY0,"." );
  1059. DecimalToASCII(((Version_data%100)/10),tempBuf,1 );
  1060. Gui_DrawFont_GBK12( 72,1,BLACK,GRAY0,tempBuf );
  1061. Gui_DrawFont_GBK12( 78,1,BLACK,GRAY0,"." );
  1062. DecimalToASCII((Version_data%10),tempBuf,1 );
  1063. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf );
  1064. }
  1065. /*************************************************************************************
  1066. * Function: DrawTimeDispPicture
  1067. * Object: 绘制时间显示画面
  1068. * 输入: 无
  1069. * 输出: 无
  1070. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1071. **************************************************************************************/
  1072. void DrawTimeDispPicture( void )
  1073. {
  1074. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1075. if( emPictureRunState == FirstEnter )
  1076. {
  1077. LCDClear( GRAY0 );
  1078. DrawBatteryDisplay();//电池
  1079. DrawSignalDisplay();//信号
  1080. DrawSilenceDisplay();//静音
  1081. DisplayHeader(0x00,0x01,24);//时间
  1082. DecimalToASCII( displayTimeBuf.year,tempBuf,4 );
  1083. Gui_DrawFont_GBK16( 13,6,BLACK,GRAY0,tempBuf );
  1084. Gui_DrawFont_GBK16( 45,6,BLACK,GRAY0,"年" );
  1085. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  1086. Gui_DrawFont_GBK16( 61,6,BLACK,GRAY0,tempBuf );
  1087. Gui_DrawFont_GBK16( 77,6,BLACK,GRAY0,"月" );
  1088. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  1089. Gui_DrawFont_GBK16( 93,6,BLACK,GRAY0,tempBuf );
  1090. Gui_DrawFont_GBK16( 109,6,BLACK,GRAY0,"日" );
  1091. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  1092. Gui_DrawFont_GBK16( 45,2,BLACK,GRAY0,tempBuf );
  1093. Gui_DrawFont_GBK16( 65,2,BLACK,GRAY0,":" );
  1094. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  1095. Gui_DrawFont_GBK16( 77,2,BLACK,GRAY0,tempBuf );
  1096. emPictureRunState = Update;
  1097. }
  1098. else
  1099. {
  1100. DrawBatteryDisplay();//电池
  1101. DrawSignalDisplay();//信号
  1102. DrawSilenceDisplay();//静音
  1103. DecimalToASCII( displayTimeBuf.year,tempBuf,4 );
  1104. Gui_DrawFont_GBK16( 13,6,BLACK,GRAY0,tempBuf );
  1105. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  1106. Gui_DrawFont_GBK16( 61,6,BLACK,GRAY0,tempBuf );
  1107. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  1108. Gui_DrawFont_GBK16( 93,6,BLACK,GRAY0,tempBuf );
  1109. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  1110. Gui_DrawFont_GBK16( 45,2,BLACK,GRAY0,tempBuf );
  1111. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  1112. Gui_DrawFont_GBK16( 77,2,BLACK,GRAY0,tempBuf );
  1113. }
  1114. }
  1115. /*************************************************************************************
  1116. * Function: DrawTimeSetPicture
  1117. * Object: 绘制时间设置画面
  1118. * 输入: 无
  1119. * 输出: 无
  1120. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1121. **************************************************************************************/
  1122. void DrawTimeSetPicture( void )
  1123. {
  1124. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1125. if( emPictureRunState == FirstEnter )
  1126. {
  1127. LCDClear( GRAY0 );
  1128. DrawBatteryDisplay();//电池
  1129. DrawSignalDisplay();//信号
  1130. DrawSilenceDisplay();//静音
  1131. DisplayHeader(0x00,0x01,24);//时间
  1132. DisplayHeader(0xff,0xff,94);//扳手
  1133. Gui_DrawFont_GBK12( 5,7,BLACK,GRAY0,"时间确认" );
  1134. Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0,"----" );
  1135. DecimalToASCII( displayTimeBuf.year,tempBuf,4 );
  1136. Gui_DrawFont_GBK12( 13,5,BLACK,GRAY0,tempBuf );
  1137. Gui_DrawFont_GBK12( 45,5,BLACK,GRAY0,"年" );
  1138. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  1139. Gui_DrawFont_GBK12( 61,5,BLACK,GRAY0,tempBuf );
  1140. Gui_DrawFont_GBK12( 77,5,BLACK,GRAY0,"月" );
  1141. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  1142. Gui_DrawFont_GBK12( 93,5,BLACK,GRAY0,tempBuf );
  1143. Gui_DrawFont_GBK12( 109,5,BLACK,GRAY0,"日" );
  1144. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  1145. Gui_DrawFont_GBK12( 45,2,BLACK,GRAY0,tempBuf );
  1146. Gui_DrawFont_GBK12( 65,2,BLACK,GRAY0,":" );
  1147. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  1148. Gui_DrawFont_GBK12( 77,2,BLACK,GRAY0,tempBuf );
  1149. emPictureRunState = Update;
  1150. }
  1151. else //只更新数值
  1152. {
  1153. DrawBatteryDisplay();//电池
  1154. DrawSignalDisplay();//信号
  1155. DrawSilenceDisplay();//静音
  1156. switch( emSetTimeChoose)
  1157. {
  1158. case Year:
  1159. DecimalToASCII( setTimeBuf.year,tempBuf,4 );
  1160. Gui_DrawFont_GBK12( 13,5,BLACK,GRAY0,tempBuf );
  1161. Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0,"----" );
  1162. Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " );
  1163. Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " );
  1164. Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " );
  1165. Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " );
  1166. break;
  1167. case Month:
  1168. DecimalToASCII( setTimeBuf.month,tempBuf,2 );
  1169. Gui_DrawFont_GBK12( 61,5,BLACK,GRAY0,tempBuf );
  1170. DecimalToASCII( setTimeBuf.date,tempBuf,2 );
  1171. Gui_DrawFont_GBK12( 93,5,BLACK,GRAY0,tempBuf );//在显示月的同时也显示日期
  1172. Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " );
  1173. Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0,"--" );
  1174. Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " );
  1175. Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " );
  1176. Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " );
  1177. break;
  1178. case Date:
  1179. DecimalToASCII( setTimeBuf.date,tempBuf,2 );
  1180. Gui_DrawFont_GBK12( 93,5,BLACK,GRAY0,tempBuf );
  1181. Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " );
  1182. Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " );
  1183. Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0,"--" );
  1184. Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " );
  1185. Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " );
  1186. break;
  1187. case Hour:
  1188. DecimalToASCII( setTimeBuf.hour,tempBuf,2 );
  1189. Gui_DrawFont_GBK12( 45,2,BLACK,GRAY0,tempBuf );
  1190. Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " );
  1191. Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " );
  1192. Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " );
  1193. Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0,"--" );
  1194. Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0," " );
  1195. break;
  1196. case Minute:
  1197. DecimalToASCII( setTimeBuf.minute,tempBuf,2 );
  1198. Gui_DrawFont_GBK12( 77,2,BLACK,GRAY0,tempBuf );
  1199. Gui_DrawFont_GBK8( 15,3,BLACK,GRAY0," " );
  1200. Gui_DrawFont_GBK8( 62,3,BLACK,GRAY0," " );
  1201. Gui_DrawFont_GBK8( 94,3,BLACK,GRAY0," " );
  1202. Gui_DrawFont_GBK8( 46,0,BLACK,GRAY0," " );
  1203. Gui_DrawFont_GBK8( 78,0,BLACK,GRAY0,"--" );
  1204. break;
  1205. default:break;
  1206. }
  1207. }
  1208. }
  1209. /*************************************************************************************
  1210. * Function: DrawPasswordSetPicture
  1211. * Object: 绘制密码设置画面
  1212. * 输入: 无
  1213. * 输出: 无
  1214. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1215. **************************************************************************************/
  1216. void DrawPasswordSetPicture( void )
  1217. {
  1218. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1219. uint8_t i;
  1220. if( emPictureRunState == FirstEnter )
  1221. {
  1222. LCDClear( GRAY0 );
  1223. DrawBatteryDisplay();//电池
  1224. DrawSignalDisplay();//信号
  1225. DrawSilenceDisplay();//静音
  1226. DisplayHeader(0xff,0xff,92);//锁1
  1227. Gui_DrawFont_GBK12( 25,5,BLACK,GRAY0,"设置密码" );
  1228. Gui_DrawFont_GBK8( 78,4,BLACK,GRAY0,"_" );
  1229. for( i = 0 ; i < 3 ; i++ )
  1230. {
  1231. DecimalToASCII( setPasswordBuf[i],tempBuf,1 );
  1232. Gui_DrawFont_GBK8( 78 + i * 8,5,BLACK,GRAY0, tempBuf);
  1233. }
  1234. Gui_DrawFont_GBK12( 25,2,BLACK,GRAY0,"确认密码" );
  1235. for( i = 0 ; i < 3 ; i++ )
  1236. {
  1237. DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 );
  1238. Gui_DrawFont_GBK8( 78 + i * 8,2,BLACK,GRAY0, tempBuf);
  1239. }
  1240. emPictureRunState = Update;
  1241. }
  1242. else
  1243. {
  1244. DrawBatteryDisplay();//电池
  1245. DrawSignalDisplay();//信号
  1246. DrawSilenceDisplay();//静音
  1247. switch(modifyStep)
  1248. {
  1249. case 1:
  1250. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0,"_" );
  1251. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " );
  1252. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " );
  1253. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " );
  1254. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " );
  1255. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " );
  1256. break;
  1257. case 2:
  1258. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " );
  1259. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0,"_" );
  1260. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " );
  1261. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " );
  1262. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " );
  1263. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " );
  1264. break;
  1265. case 3:
  1266. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " );
  1267. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " );
  1268. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0,"_" );
  1269. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " );
  1270. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " );
  1271. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " );
  1272. break;
  1273. case 4:
  1274. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " );
  1275. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " );
  1276. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " );
  1277. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0,"_" );
  1278. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " );
  1279. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " );
  1280. break;
  1281. case 5:
  1282. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " );
  1283. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " );
  1284. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " );
  1285. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " );
  1286. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0,"_" );
  1287. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0," " );
  1288. break;
  1289. case 6:
  1290. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,4,BLACK,GRAY0," " );
  1291. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,4,BLACK,GRAY0," " );
  1292. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,4,BLACK,GRAY0," " );
  1293. Gui_DrawFont_GBK8( 78 + ( 1 - 1 ) * 8,1,BLACK,GRAY0," " );
  1294. Gui_DrawFont_GBK8( 78 + ( 2 - 1 ) * 8,1,BLACK,GRAY0," " );
  1295. Gui_DrawFont_GBK8( 78 + ( 3 - 1 ) * 8,1,BLACK,GRAY0,"_" );
  1296. break;
  1297. default:break;
  1298. }
  1299. for( i = 0 ; i < 3 ; i++ )
  1300. {
  1301. DecimalToASCII( setPasswordBuf[i],tempBuf,1 );
  1302. Gui_DrawFont_GBK8( 78 + i * 8,5,BLACK,GRAY0, tempBuf);
  1303. }
  1304. for( i = 0 ; i < 3 ; i++ )
  1305. {
  1306. DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 );
  1307. Gui_DrawFont_GBK8( 78 + i * 8,2,BLACK,GRAY0, tempBuf);
  1308. }
  1309. }
  1310. }
  1311. /*************************************************************************************
  1312. * Function: DrawVerifyInfoPicture
  1313. * Object: 绘制确认病人信息画面
  1314. * 输入: 无
  1315. * 输出: 无
  1316. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1317. **************************************************************************************/
  1318. void DrawVerifyInfoPicture( void )
  1319. {
  1320. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1321. uint8_t tempIndex = 0;
  1322. if( emPictureRunState == FirstEnter )
  1323. {
  1324. LCDClear( GRAY0 );
  1325. DrawBatteryDisplay();//电池
  1326. DrawSignalDisplay();//信号
  1327. DrawSilenceDisplay();//静音
  1328. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"请确认信息" );
  1329. Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"住院号" );
  1330. DecimalToASCII( verifyInfo.hospitalNO,tempBuf,EngineeringModeValue.hospitalNOQty );
  1331. Gui_DrawFont_GBK12( 46,4,BLACK,GRAY0,tempBuf );
  1332. Gui_DrawFont_GBK12( 4,2,BLACK,GRAY0,"病区" );
  1333. Gui_DrawFont_GBK12( 28,2,BLACK,GRAY0,"--" );
  1334. Gui_DrawFont_GBK12( 40,2,BLACK,GRAY0,"床号" );
  1335. DecimalToASCII( verifyInfo.sickroom,tempBuf,EngineeringModeValue.sickroomQty );
  1336. Gui_DrawFont_GBK12( 64,2,BLACK,GRAY0,tempBuf );
  1337. tempIndex = 64 + EngineeringModeValue.sickroomQty * 6;
  1338. Gui_DrawFont_GBK12( tempIndex,2,BLACK,GRAY0,"--" );
  1339. tempIndex += 12;
  1340. DecimalToASCII( verifyInfo.bedNO,tempBuf,EngineeringModeValue.bedNOQty );
  1341. Gui_DrawFont_GBK12( tempIndex,2,BLACK,GRAY0,tempBuf );
  1342. if( verifyInfo.modifyInfoType == HOSPITALNO_SELECTED )
  1343. {
  1344. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"<==" );
  1345. Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0," " );
  1346. }
  1347. else
  1348. {
  1349. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0," " );
  1350. Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0,"<==" );
  1351. }
  1352. emPictureRunState = Update;
  1353. }
  1354. else
  1355. {
  1356. DrawBatteryDisplay();//电池
  1357. DrawSignalDisplay();//信号
  1358. DrawSilenceDisplay();//静音
  1359. if( verifyInfo.modifyInfoType == HOSPITALNO_SELECTED )
  1360. {
  1361. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"<==" );
  1362. Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0," " );
  1363. }
  1364. else if( verifyInfo.modifyInfoType == BEDNO_SELECTED )
  1365. {
  1366. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0," " );
  1367. Gui_DrawFont_GBK12( 113,2,BLACK,GRAY0,"<==" );
  1368. }
  1369. }
  1370. }
  1371. /*************************************************************************************
  1372. * Function: DrawSetVerifyInfoPicture
  1373. * Object: 绘制设置确认病人信息画面
  1374. * 输入: 无
  1375. * 输出: 无
  1376. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1377. uint8_t tempIndex = 0;临时索引变量
  1378. **************************************************************************************/
  1379. void DrawSetVerifyInfoPicture( void )
  1380. {
  1381. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1382. uint8_t tempIndex = 0;
  1383. uint8_t i;
  1384. if( emPictureRunState == FirstEnter )
  1385. {
  1386. LCDClear( GRAY0 );
  1387. DrawBatteryDisplay();//电池
  1388. DrawSignalDisplay();//信号
  1389. DrawSilenceDisplay();//静音
  1390. DisplayHeader(0xff,0xff,94);//扳手
  1391. if( verifyInfo.modifyInfoType == HOSPITALNO_SELECTED )
  1392. {
  1393. Gui_DrawFont_GBK8Number( 56,3,BLACK,GRAY0,"-" );
  1394. }
  1395. else if( verifyInfo.modifyInfoType == BEDNO_SELECTED )
  1396. {
  1397. Gui_DrawFont_GBK8Number( 76,1,BLACK,GRAY0,"-" );
  1398. }
  1399. Gui_DrawFont_GBK12( 10,7,BLACK,GRAY0,"请确认信息" );
  1400. Gui_DrawFont_GBK12( 10,4,BLACK,GRAY0,"住院号" );
  1401. for( i = 0 ; i < EngineeringModeValue.hospitalNOQty ; i++ )
  1402. {
  1403. DecimalToASCII( setParamInfo.hospitalNO[i],tempBuf,1 );
  1404. Gui_DrawFont_GBK8Number( 56 + i * 6,4,BLACK,GRAY0,tempBuf );
  1405. }
  1406. Gui_DrawFont_GBK12( 10,2,BLACK,GRAY0,"病区" );
  1407. Gui_DrawFont_GBK12( 34,2,BLACK,GRAY0,"--" );
  1408. Gui_DrawFont_GBK12( 46,2,BLACK,GRAY0,"床号" );
  1409. for( i = 0 ; i < EngineeringModeValue.sickroomQty ; i++ )
  1410. {
  1411. DecimalToASCII( setParamInfo.sickroom[i],tempBuf,1 );
  1412. Gui_DrawFont_GBK8Number( 76 + i * 6,2,BLACK,GRAY0,tempBuf );
  1413. }
  1414. tempIndex = 76 + EngineeringModeValue.sickroomQty * 6;
  1415. Gui_DrawFont_GBK8Number( tempIndex,2,BLACK,GRAY0,"--" );
  1416. tempIndex += 12;
  1417. for( i = 0 ; i < EngineeringModeValue.bedNOQty ; i++ )
  1418. {
  1419. DecimalToASCII( setParamInfo.bedNO[i],tempBuf,1 );
  1420. Gui_DrawFont_GBK8Number( tempIndex + i * 6,2,BLACK,GRAY0,tempBuf );
  1421. }
  1422. emPictureRunState = Update;
  1423. }
  1424. else
  1425. {
  1426. DrawBatteryDisplay();//电池
  1427. DrawSignalDisplay();//信号
  1428. DrawSilenceDisplay();//静音
  1429. switch( verifyInfo.modifyInfoType )
  1430. {
  1431. case HOSPITALNO_SELECTED:
  1432. for( i = 0 ; i < EngineeringModeValue.hospitalNOQty ; i++ )
  1433. {
  1434. Gui_DrawFont_GBK8Number( 56 + i * 6,3,BLACK,GRAY0," " );
  1435. DecimalToASCII( setParamInfo.hospitalNO[i],tempBuf,1 );
  1436. Gui_DrawFont_GBK8Number( 56 + i * 6,4,BLACK,GRAY0,tempBuf );
  1437. }
  1438. switch(modifyStep)
  1439. {
  1440. case 1:
  1441. Gui_DrawFont_GBK8Number( 56 + ( 1 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1442. break;
  1443. case 2:
  1444. Gui_DrawFont_GBK8Number( 56 + ( 2 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1445. break;
  1446. case 3:
  1447. Gui_DrawFont_GBK8Number( 56 + ( 3 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1448. break;
  1449. case 4:
  1450. Gui_DrawFont_GBK8Number( 56 + ( 4 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1451. break;
  1452. case 5:
  1453. Gui_DrawFont_GBK8Number( 56 + ( 5 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1454. break;
  1455. case 6:
  1456. Gui_DrawFont_GBK8Number( 56 + ( 6 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1457. break;
  1458. case 7:
  1459. Gui_DrawFont_GBK8Number( 56 + ( 7 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1460. break;
  1461. case 8:
  1462. Gui_DrawFont_GBK8Number( 56 + ( 8 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1463. break;
  1464. case 9:
  1465. Gui_DrawFont_GBK8Number( 56 + ( 9 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1466. break;
  1467. case 10:
  1468. Gui_DrawFont_GBK8( 56 + ( 10 - 1 ) * 6,3,BLACK,GRAY0,"-" );
  1469. break;
  1470. default:break;
  1471. }
  1472. break;
  1473. case BEDNO_SELECTED:
  1474. for( i = 0 ; i < EngineeringModeValue.sickroomQty ; i++ )//病区
  1475. {
  1476. DecimalToASCII( setParamInfo.sickroom[i],tempBuf,1 );
  1477. Gui_DrawFont_GBK8Number( 76 + i * 6,2,BLACK,GRAY0,tempBuf );
  1478. Gui_DrawFont_GBK8Number( 76 + i * 6,1,BLACK,GRAY0," " );
  1479. if( i == ( modifyStep - 1 ) )//判断操作的是否是当前位
  1480. {
  1481. Gui_DrawFont_GBK8Number( 76 + i * 6,1,BLACK,GRAY0,"-" );
  1482. }
  1483. else
  1484. {
  1485. Gui_DrawFont_GBK8Number( 76 + i * 6,1,BLACK,GRAY0," " );
  1486. }
  1487. }
  1488. // switch( modifyStep )//判断操作的是否是当前位
  1489. // {
  1490. // case 1:
  1491. // Gui_DrawFont_GBK8Number( 76 + ( 1 - 1 ) * 6,1,BLACK,GRAY0,"-" );
  1492. // break;
  1493. // case 2:
  1494. // Gui_DrawFont_GBK8Number( 76 + ( 2 - 1 ) * 6,1,BLACK,GRAY0,"-" );
  1495. // break;
  1496. // case 3:
  1497. // Gui_DrawFont_GBK8Number( 76 + ( 3 - 1 ) * 6,1,BLACK,GRAY0,"-" );
  1498. // break;
  1499. // default:break;
  1500. // }
  1501. tempIndex = 76 + EngineeringModeValue.sickroomQty * 6;
  1502. Gui_DrawFont_GBK8Number( tempIndex,2,BLACK,GRAY0,"--" );
  1503. tempIndex += 12;
  1504. for( i = 0 ; i < EngineeringModeValue.bedNOQty ; i++ )//病床
  1505. {
  1506. Gui_DrawFont_GBK8Number( tempIndex + i * 6,1,BLACK,GRAY0," " );
  1507. DecimalToASCII( setParamInfo.bedNO[i],tempBuf,1 );
  1508. Gui_DrawFont_GBK8Number( tempIndex + i * 6,2,BLACK,GRAY0,tempBuf );
  1509. if( ( i + EngineeringModeValue.sickroomQty ) == ( modifyStep - 1 ) )
  1510. {
  1511. Gui_DrawFont_GBK8Number( tempIndex + i * 6,1,BLACK,GRAY0,"-" );
  1512. }
  1513. else
  1514. {
  1515. Gui_DrawFont_GBK8Number( tempIndex + i * 6,1,BLACK,GRAY0," " );
  1516. }
  1517. }
  1518. // switch( modifyStep )
  1519. // {
  1520. // case 4:
  1521. // Gui_DrawFont_GBK8Number( tempIndex + ( 1 - 1 ) * 6,1,BLACK,GRAY0,"-" );
  1522. // break;
  1523. // case 5:
  1524. // Gui_DrawFont_GBK8Number( tempIndex + ( 2 - 1 ) * 6,1,BLACK,GRAY0,"-" );
  1525. // break;
  1526. // case 6:
  1527. // Gui_DrawFont_GBK8Number( tempIndex + ( 3 - 1 ) * 6,1,BLACK,GRAY0,"-" );
  1528. // break;
  1529. // default:break;
  1530. // }
  1531. break;
  1532. default:break;
  1533. }
  1534. }
  1535. }
  1536. /*************************************************************************************
  1537. * Function: DrawNoInpatientPicture
  1538. * Object: 绘制未设置住院号提醒界面
  1539. * 输入: 无
  1540. * 输出: 无
  1541. * 备注: 未设置住院号不能进入参数设置界面,按返回按键回到设置住院号界面
  1542. **************************************************************************************/
  1543. void DrawNoInpatientPicture(void)
  1544. {
  1545. LCDClear( GRAY0 );
  1546. Gui_DrawFont_GBK12( 25,4,BLACK,GRAY0,"请设置住院号!" );
  1547. }
  1548. /*************************************************************************************
  1549. * Function: DrawAiroutPicture
  1550. * Object: 绘制排气信息画面
  1551. * 输入: 无
  1552. * 输出: 无
  1553. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1554. uint16_t tempData = 0;临时计算变量
  1555. **************************************************************************************/
  1556. void DrawAiroutPicture( void )
  1557. {
  1558. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1559. uint16_t tempData = 0;
  1560. if( emPictureRunState == FirstEnter )
  1561. {
  1562. LCDClear( GRAY0 );
  1563. DrawBatteryDisplay();//电池
  1564. DrawSignalDisplay();//信号
  1565. DrawSilenceDisplay();//静音
  1566. DisplayHeader(0xff,0xff,6);//进度条1
  1567. Gui_DrawFont_GBK16( 44,5,BLACK,GRAY0,"排 气" );
  1568. if( realTimeData.airoutValue>=999) realTimeData.airoutValue =999;//限制排气最大值为100ml
  1569. tempData = realTimeData.airoutValue / 10;
  1570. DecimalToASCII( tempData,tempBuf,2 );
  1571. Gui_DrawFont_GBK16( 44,2,BLACK,GRAY0,tempBuf );
  1572. Gui_DrawFont_GBK16( 60,2,BLACK,GRAY0,"." );
  1573. tempData = realTimeData.airoutValue % 10;
  1574. DecimalToASCII( tempData,tempBuf,1 );
  1575. Gui_DrawFont_GBK16( 68,2,BLACK,GRAY0,tempBuf );
  1576. Gui_DrawFont_GBK16( 78,2,BLACK,GRAY0,"ml" );
  1577. emPictureRunState = Update;
  1578. }
  1579. else
  1580. {
  1581. DrawBatteryDisplay();//电池
  1582. DrawSignalDisplay();//信号
  1583. DrawSilenceDisplay();//静音
  1584. DisplayHeader(0xff,0xff,5);//进度条1
  1585. if( realTimeData.airoutValue>=999) realTimeData.airoutValue =999;//限制排气最大值为100ml
  1586. tempData = realTimeData.airoutValue / 10;
  1587. DecimalToASCII( tempData,tempBuf,2 );
  1588. Gui_DrawFont_GBK16( 44,2,BLACK,GRAY0,tempBuf );
  1589. Gui_DrawFont_GBK16( 60,2,BLACK,GRAY0,"." );
  1590. tempData = realTimeData.airoutValue % 10;
  1591. DecimalToASCII( tempData,tempBuf,1 );
  1592. Gui_DrawFont_GBK16( 68,2,BLACK,GRAY0,tempBuf );
  1593. Gui_DrawFont_GBK16( 78,2,BLACK,GRAY0,"ml" );
  1594. }
  1595. }
  1596. /*************************************************************************************
  1597. * Function: DrawSetParameterPicture
  1598. * Object: 绘制输注参数设置画面
  1599. * 输入: 无
  1600. * 输出: 无
  1601. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  1602. uint16_t tempData = 0;临时计算变量
  1603. uint8_t tempLocal = 0;
  1604. uint8_t tempNumQty = 0;
  1605. **************************************************************************************/
  1606. void DrawSetParameterPicture( void )
  1607. {
  1608. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  1609. uint16_t tempData = 0;
  1610. uint8_t tempLocal = 0;
  1611. uint8_t tempNumQty = 0;
  1612. if( emPictureRunState == FirstEnter )
  1613. {
  1614. LCDClear( GRAY0 );
  1615. DrawBatteryDisplay();//电池
  1616. DrawSignalDisplay();//信号
  1617. DrawSilenceDisplay();//静音
  1618. DisplayHeader(0xff,0xff,94);//扳手
  1619. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"总量" );//xxx ml
  1620. if( setParamInfo.totalDose >= 100 )//计算数字显示位置,3位数
  1621. {
  1622. tempNumQty = 3;
  1623. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1624. if( setParamInfo.emModifyParam == TotalDose )
  1625. {
  1626. Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"___" );//TotalDose
  1627. }
  1628. }
  1629. else if( setParamInfo.totalDose >= 10 )//计算数字显示位置,2位数
  1630. {
  1631. tempNumQty = 2;
  1632. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1633. if( setParamInfo.emModifyParam == TotalDose )
  1634. {
  1635. Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"__" );//TotalDose
  1636. }
  1637. }
  1638. else//计算数字显示位置,1位数
  1639. {
  1640. tempNumQty = 1;
  1641. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1642. if( setParamInfo.emModifyParam == TotalDose )
  1643. {
  1644. Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"_" );//TotalDose
  1645. }
  1646. }
  1647. DecimalToASCII( setParamInfo.totalDose,tempBuf,tempNumQty );
  1648. Gui_DrawFont_GBK8Number( 28 + tempLocal,7,BLACK,GRAY0,tempBuf );
  1649. Gui_DrawFont_GBK8( 51,7,BLACK,GRAY0,"ml" );
  1650. Gui_DrawFont_GBK12( 64,7,BLACK,GRAY0,"首次" );//xx ml
  1651. if( setParamInfo.firstDose >= 10 )//计算数字显示位置,2位数
  1652. {
  1653. tempNumQty = 2;
  1654. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1655. if( setParamInfo.emModifyParam == FirstDose )
  1656. {
  1657. Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"__" );
  1658. }
  1659. }
  1660. else//计算数字显示位置,1位数
  1661. {
  1662. tempNumQty = 1;
  1663. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1664. if( setParamInfo.emModifyParam == FirstDose )
  1665. {
  1666. Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"_" );
  1667. }
  1668. }
  1669. DecimalToASCII( setParamInfo.firstDose,tempBuf,tempNumQty );
  1670. Gui_DrawFont_GBK8Number( 88 + tempLocal,7,BLACK,GRAY0,tempBuf );
  1671. Gui_DrawFont_GBK8( 111,7,BLACK,GRAY0,"ml" );
  1672. Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"追加" ); //xx.x ml
  1673. //显示位置计算
  1674. tempNumQty = 0;
  1675. if( setParamInfo.superaddition1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数
  1676. {
  1677. tempNumQty += 2;
  1678. }
  1679. if( setParamInfo.superaddition1 / 100 != 0 )//除100不等于0表明十位有数
  1680. {
  1681. tempNumQty += 2;//个位、十位有数
  1682. }
  1683. else
  1684. {
  1685. tempNumQty += 1;//个位有数
  1686. }
  1687. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1688. //显示数据计算
  1689. tempData = setParamInfo.superaddition1 / 10;//显示个位十位数字
  1690. if( tempData > 9 )//个位、十位有数
  1691. {
  1692. tempNumQty = 2;
  1693. if( setParamInfo.emModifyParam == Superaddition )
  1694. {
  1695. Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"__" );//Superaddition
  1696. }
  1697. }
  1698. else//个位有数
  1699. {
  1700. tempNumQty = 1;
  1701. if( setParamInfo.emModifyParam == Superaddition )
  1702. {
  1703. Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"_" );//Superaddition
  1704. }
  1705. }
  1706. DecimalToASCII( tempData,tempBuf,tempNumQty );
  1707. Gui_DrawFont_GBK8Number( 28 + tempLocal,4,BLACK,GRAY0,tempBuf );
  1708. tempData = setParamInfo.superaddition1 % 10;//显示小数
  1709. if( tempData != 0 )
  1710. {
  1711. tempLocal = 28 + tempLocal + tempNumQty * 5 + 1;
  1712. if( setParamInfo.emModifyParam == Superaddition )
  1713. {
  1714. Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//Superaddition
  1715. }
  1716. Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." );
  1717. tempLocal += 5;
  1718. DecimalToASCII( tempData,tempBuf,1 );
  1719. Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf );
  1720. }
  1721. Gui_DrawFont_GBK8( 51,4,BLACK,GRAY0,"ml" );
  1722. Gui_DrawFont_GBK12( 64,4,BLACK,GRAY0,"持续" );//xx.x ml/h
  1723. //显示位置计算
  1724. tempNumQty = 0;
  1725. if( setParamInfo.continueDose1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数
  1726. {
  1727. tempNumQty += 2;
  1728. }
  1729. if( setParamInfo.continueDose1 / 100 != 0 )//除100不等于0表明十位有数
  1730. {
  1731. tempNumQty += 2;//个位、十位有数
  1732. }
  1733. else
  1734. {
  1735. tempNumQty += 1;//个位有数
  1736. }
  1737. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1738. //显示数据计算
  1739. tempData = setParamInfo.continueDose1 / 10;//显示个位十位数字
  1740. if( tempData > 9 )//个位、十位有数
  1741. {
  1742. tempNumQty = 2;
  1743. if( setParamInfo.emModifyParam == continueDose )
  1744. {
  1745. Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"__" );//continueDose
  1746. }
  1747. }
  1748. else//个位有数
  1749. {
  1750. tempNumQty = 1;
  1751. if( setParamInfo.emModifyParam == continueDose )
  1752. {
  1753. Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"_" );//continueDose
  1754. }
  1755. }
  1756. DecimalToASCII( tempData,tempBuf,tempNumQty );
  1757. Gui_DrawFont_GBK8Number( 88 + tempLocal,4,BLACK,GRAY0,tempBuf );
  1758. tempData = setParamInfo.continueDose1 % 10;//显示小数
  1759. if( tempData != 0 )
  1760. {
  1761. tempLocal = 88 + tempLocal + tempNumQty * 5 + 1;
  1762. if( setParamInfo.emModifyParam == continueDose )
  1763. {
  1764. Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//continueDose
  1765. }
  1766. Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." );
  1767. tempLocal += 5;
  1768. DecimalToASCII( tempData,tempBuf,1 );
  1769. Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf );
  1770. }
  1771. Gui_DrawFont_GBK8( 111,4,BLACK,GRAY0,"ml/h" );
  1772. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"锁时" );
  1773. if( setParamInfo.lockTime1 >= 10 )//计算数字显示位置,2位数
  1774. {
  1775. tempNumQty = 2;
  1776. tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1777. if( setParamInfo.emModifyParam == LockTime )
  1778. {
  1779. Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"__" );//LockTime
  1780. }
  1781. }
  1782. else//计算数字显示位置,1位数
  1783. {
  1784. tempNumQty = 1;
  1785. tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1786. if( setParamInfo.emModifyParam == LockTime )
  1787. {
  1788. Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"_" );//LockTime
  1789. }
  1790. }
  1791. DecimalToASCII( setParamInfo.lockTime1,tempBuf,tempNumQty );
  1792. Gui_DrawFont_GBK8Number( 28 + tempLocal,1,BLACK,GRAY0,tempBuf );
  1793. Gui_DrawFont_GBK8( 46,1,BLACK,GRAY0,"min" );
  1794. Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,"极限" );
  1795. if( setParamInfo.limitDose1 >= 100 )//计算数字显示位置,3位数
  1796. {
  1797. tempNumQty = 3;
  1798. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1799. if( setParamInfo.emModifyParam == LimitDose )
  1800. {
  1801. Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"___" );//LimitDose
  1802. }
  1803. }
  1804. else if( setParamInfo.limitDose1 >= 10 )//计算数字显示位置,2位数
  1805. {
  1806. tempNumQty = 2;
  1807. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1808. if( setParamInfo.emModifyParam == LimitDose )
  1809. {
  1810. Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"__" );//LimitDose
  1811. }
  1812. }
  1813. else//计算数字显示位置,1位数
  1814. {
  1815. tempNumQty = 1;
  1816. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1817. if( setParamInfo.emModifyParam == LimitDose )
  1818. {
  1819. Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"_" );//LimitDose
  1820. }
  1821. }
  1822. DecimalToASCII( setParamInfo.limitDose1,tempBuf,tempNumQty );
  1823. Gui_DrawFont_GBK8Number( 88 + tempLocal,1,BLACK,GRAY0,tempBuf );
  1824. Gui_DrawFont_GBK8( 111,1,BLACK,GRAY0,"ml/h" );
  1825. emPictureRunState = Update;
  1826. }
  1827. else
  1828. {
  1829. DrawBatteryDisplay();//电池
  1830. DrawSignalDisplay();//信号
  1831. DrawSilenceDisplay();//静音
  1832. LCDPartClear( 28 , 50 , 6 , 1 );//TotalDose
  1833. LCDPartClear( 88 , 110 , 6 , 1 );//FirstDose
  1834. LCDPartClear( 28 , 50 , 3 , 1 );//Superaddition
  1835. LCDPartClear( 88 , 110 , 3 , 1 );//continueDose
  1836. LCDPartClear( 28 , 45 , 0 , 1 );//LockTime
  1837. LCDPartClear( 88 , 110 , 0 , 1 );//LimitDose
  1838. switch( setParamInfo.emModifyParam )
  1839. {
  1840. case TotalDose:
  1841. if( setParamInfo.totalDose >= 100 )//计算数字显示位置,3位数
  1842. {
  1843. tempNumQty = 3;
  1844. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1845. Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"___" );//TotalDose
  1846. }
  1847. else if( setParamInfo.totalDose >= 10 )//计算数字显示位置,2位数
  1848. {
  1849. tempNumQty = 2;
  1850. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1851. Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"__" );//TotalDose
  1852. }
  1853. else//计算数字显示位置,1位数
  1854. {
  1855. tempNumQty = 1;
  1856. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1857. Gui_DrawFont_GBK8Number( 28 + tempLocal,6,BLACK,GRAY0,"_" );//TotalDose
  1858. }
  1859. LCDPartClear( 28 , 50 , 7 , 1 );//TotalDose
  1860. DecimalToASCII( setParamInfo.totalDose,tempBuf,tempNumQty );
  1861. Gui_DrawFont_GBK8Number( 28 + tempLocal,7,BLACK,GRAY0,tempBuf );
  1862. break;
  1863. case FirstDose:
  1864. if( setParamInfo.firstDose >= 10 )//计算数字显示位置,2位数
  1865. {
  1866. tempNumQty = 2;
  1867. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1868. Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"__" );
  1869. }
  1870. else//计算数字显示位置,1位数
  1871. {
  1872. tempNumQty = 1;
  1873. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1874. Gui_DrawFont_GBK8Number( 88 + tempLocal,6,BLACK,GRAY0,"_" );
  1875. }
  1876. LCDPartClear( 88 , 110 , 7 , 1 );//FirstDose
  1877. DecimalToASCII( setParamInfo.firstDose,tempBuf,tempNumQty );
  1878. Gui_DrawFont_GBK8Number( 88 + tempLocal,7,BLACK,GRAY0,tempBuf );
  1879. break;
  1880. case Superaddition:
  1881. //显示位置计算
  1882. tempNumQty = 0;
  1883. if( setParamInfo.superaddition1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数
  1884. {
  1885. tempNumQty += 2;
  1886. }
  1887. if( setParamInfo.superaddition1 / 100 != 0 )//除100不等于0表明十位有数
  1888. {
  1889. tempNumQty += 2;//个位、十位有数
  1890. }
  1891. else
  1892. {
  1893. tempNumQty += 1;//个位有数
  1894. }
  1895. tempLocal = ( 22 - tempNumQty * 5 ) / 2; //(50 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1896. //显示数据计算
  1897. LCDPartClear( 28 , 50 , 4 , 1 );//Superaddition
  1898. tempData = setParamInfo.superaddition1 / 10;//显示个位十位数字
  1899. if( tempData > 9 )//个位、十位有数
  1900. {
  1901. tempNumQty = 2;
  1902. Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"__" );//Superaddition
  1903. }
  1904. else//个位有数
  1905. {
  1906. tempNumQty = 1;
  1907. Gui_DrawFont_GBK8Number( 28 + tempLocal,3,BLACK,GRAY0,"_" );//Superaddition
  1908. }
  1909. DecimalToASCII( tempData,tempBuf,tempNumQty );
  1910. Gui_DrawFont_GBK8Number( 28 + tempLocal,4,BLACK,GRAY0,tempBuf );
  1911. tempData = setParamInfo.superaddition1 % 10;//显示小数
  1912. if( tempData != 0 )
  1913. {
  1914. tempLocal = 28 + tempLocal + tempNumQty * 5 + 1;
  1915. Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//Superaddition
  1916. Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." );
  1917. tempLocal += 5;
  1918. DecimalToASCII( tempData,tempBuf,1 );
  1919. Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf );
  1920. }
  1921. break;
  1922. case continueDose:
  1923. //显示位置计算
  1924. tempNumQty = 0;
  1925. if( setParamInfo.continueDose1 % 10 != 0 )//取余10不等0表明有小数位,小数点+小数
  1926. {
  1927. tempNumQty += 2;
  1928. }
  1929. if( setParamInfo.continueDose1 / 100 != 0 )//除100不等于0表明十位有数
  1930. {
  1931. tempNumQty += 2;//个位、十位有数
  1932. }
  1933. else
  1934. {
  1935. tempNumQty += 1;//个位有数
  1936. }
  1937. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1938. //显示数据计算
  1939. LCDPartClear( 88 , 110 , 4 , 1 );//continueDose
  1940. tempData = setParamInfo.continueDose1 / 10;//显示个位十位数字
  1941. if( tempData > 9 )//个位、十位有数
  1942. {
  1943. tempNumQty = 2;
  1944. Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"__" );//continueDose
  1945. }
  1946. else//个位有数
  1947. {
  1948. tempNumQty = 1;
  1949. Gui_DrawFont_GBK8Number( 88 + tempLocal,3,BLACK,GRAY0,"_" );//continueDose
  1950. }
  1951. DecimalToASCII( tempData,tempBuf,tempNumQty );
  1952. Gui_DrawFont_GBK8Number( 88 + tempLocal,4,BLACK,GRAY0,tempBuf );
  1953. tempData = setParamInfo.continueDose1 % 10;//显示小数
  1954. if( tempData != 0 )
  1955. {
  1956. tempLocal = 88 + tempLocal + tempNumQty * 5 + 1;
  1957. Gui_DrawFont_GBK8Number( tempLocal,3,BLACK,GRAY0,"__" );//continueDose
  1958. Gui_DrawFont_GBK8( tempLocal,4,BLACK,GRAY0,"." );
  1959. tempLocal += 5;
  1960. DecimalToASCII( tempData,tempBuf,1 );
  1961. Gui_DrawFont_GBK8Number( tempLocal,4,BLACK,GRAY0,tempBuf );
  1962. }
  1963. break;
  1964. case LockTime:
  1965. if( setParamInfo.lockTime1 >= 10 )//计算数字显示位置,2位数
  1966. {
  1967. tempNumQty = 2;
  1968. tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置
  1969. Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"__" );//LockTime
  1970. }
  1971. else//计算数字显示位置,1位数
  1972. {
  1973. tempNumQty = 1;
  1974. tempLocal = ( 17 - tempNumQty * 5 ) / 2; //(45 - 28 - 数字个数*5)/2得出剩余宽度,用28+剩余宽度得出显示位置?
  1975. Gui_DrawFont_GBK8Number( 28 + tempLocal,0,BLACK,GRAY0,"_" );//LockTime
  1976. }
  1977. LCDPartClear( 28 , 45 , 1 , 1 );//LockTime
  1978. DecimalToASCII( setParamInfo.lockTime1,tempBuf,tempNumQty );
  1979. Gui_DrawFont_GBK8Number( 28 + tempLocal,1,BLACK,GRAY0,tempBuf );
  1980. break;
  1981. case LimitDose:
  1982. if( setParamInfo.limitDose1 >= 100 )//计算数字显示位置,3位数
  1983. {
  1984. tempNumQty = 3;
  1985. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1986. Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"___" );//LimitDose
  1987. }
  1988. else if( setParamInfo.limitDose1 >= 10 )//计算数字显示位置,2位数
  1989. {
  1990. tempNumQty = 2;
  1991. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1992. Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"__" );//LimitDose
  1993. }
  1994. else//计算数字显示位置,1位数
  1995. {
  1996. tempNumQty = 1;
  1997. tempLocal = ( 23 - tempNumQty * 5 ) / 2; //(111 - 64 - 24 - 数字个数*5)/2得出剩余宽度,用88+剩余宽度得出显示位置
  1998. Gui_DrawFont_GBK8Number( 88 + tempLocal,0,BLACK,GRAY0,"_" );//LimitDose
  1999. }
  2000. LCDPartClear( 88 , 110 , 1 , 1 );//LimitDose
  2001. DecimalToASCII( setParamInfo.limitDose1,tempBuf,tempNumQty );
  2002. Gui_DrawFont_GBK8Number( 88 + tempLocal,1,BLACK,GRAY0,tempBuf );
  2003. break;
  2004. default:break;
  2005. }
  2006. }
  2007. }
  2008. /*************************************************************************************
  2009. * Function: DrawPasswordSetPicture
  2010. * Object: 绘制运行-首次量画面
  2011. * 输入: 无
  2012. * 输出: 无
  2013. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2014. uint16_t tempInputDose = 0;临时计算变量
  2015. **************************************************************************************/
  2016. void DrawRunFirstDosePicture( void )
  2017. {
  2018. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2019. uint16_t tempInputDose = 0;
  2020. if(emSysWorkStep == EnterRunFirstDose)
  2021. {
  2022. if( emPictureRunState == FirstEnter )
  2023. {
  2024. LCDClear( GRAY0 );
  2025. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2026. {
  2027. DisplayHeader(0xff,0xff,82);//锁2
  2028. }
  2029. else
  2030. {
  2031. DisplayHeader(0x00,0x00,82);//清锁2
  2032. }
  2033. if( realTimeData.stateRun == Pause )
  2034. {
  2035. DisplayHeader(0xff,0xff,81);//暂停
  2036. }
  2037. else
  2038. {
  2039. DisplayHeader(0x00,0x00,81);//暂停
  2040. }
  2041. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2042. {
  2043. DisplayHeader(0xff,0xff,34);//呼叫
  2044. }
  2045. else
  2046. {
  2047. DisplayHeader(0x00,0x00,34);//呼叫
  2048. }
  2049. DrawBatteryDisplay();//电池
  2050. DrawSignalDisplay();//信号
  2051. DrawSilenceDisplay();//静音
  2052. Gui_DrawFont_GBK12( 32,6,BLACK,GRAY0,"总 量" );
  2053. DecimalToASCII( setParamInfo.totalDose,tempBuf,3 );
  2054. Gui_DrawFont_GBK12( 80,6,BLACK,GRAY0,tempBuf );
  2055. Gui_DrawFont_GBK12( 106,6,BLACK,GRAY0,"ml" );
  2056. Gui_DrawFont_GBK12( 32,3,BLACK,GRAY0,"首次量" );
  2057. tempInputDose = realTimeData.firstDose / 10;
  2058. DecimalToASCII( tempInputDose,tempBuf,2 );
  2059. Gui_DrawFont_GBK12( 80,3,BLACK,GRAY0,tempBuf );
  2060. Gui_DrawFont_GBK12( 92,3,BLACK,GRAY0,"." );
  2061. tempInputDose = realTimeData.firstDose % 10;
  2062. DecimalToASCII( tempInputDose,tempBuf,1 );
  2063. Gui_DrawFont_GBK12( 98,3,BLACK,GRAY0,tempBuf );
  2064. Gui_DrawFont_GBK12( 106,3,BLACK,GRAY0,"ml" );
  2065. emPictureRunState = Update;
  2066. }
  2067. else//只更新剩余量数据信息
  2068. {
  2069. if(motorWorkState == MOTOR_WORK_OFF)
  2070. {
  2071. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2072. {
  2073. DisplayHeader(0xff,0xff,82);//锁2
  2074. }
  2075. else
  2076. {
  2077. DisplayHeader(0x00,0x00,82);//清锁2
  2078. }
  2079. if( realTimeData.stateRun == Pause )
  2080. {
  2081. DisplayHeader(0xff,0xff,81);//暂停
  2082. }
  2083. else
  2084. {
  2085. DisplayHeader(0x00,0x00,81);//暂停
  2086. }
  2087. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2088. {
  2089. DisplayHeader(0xff,0xff,34);//呼叫
  2090. }
  2091. else
  2092. {
  2093. DisplayHeader(0x00,0x00,34);//呼叫
  2094. }
  2095. // if(motorWorkState == MOTOR_WORK_ON)
  2096. // {
  2097. // return;
  2098. // }
  2099. DrawBatteryDisplay();//电池
  2100. DrawSignalDisplay();//信号
  2101. DrawSilenceDisplay();//静音
  2102. /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET )
  2103. {
  2104. switch( modifyStep )
  2105. {
  2106. case 1:
  2107. DisplayHeader(0x00,0x00,8);//进度条
  2108. DisplayHeader(0xff,0xff,5);//进度条
  2109. modifyStep = 2;
  2110. break;
  2111. case 2:
  2112. DisplayHeader(0xff,0xff,6);//进度条
  2113. modifyStep = 3;
  2114. break;
  2115. case 3:
  2116. DisplayHeader(0xff,0xff,7);//进度条
  2117. modifyStep = 4;
  2118. break;
  2119. case 4:
  2120. DisplayHeader(0xff,0xff,8);//进度条
  2121. modifyStep = 1;
  2122. break;
  2123. default:break;
  2124. }
  2125. }*/
  2126. // if(motorWorkState == MOTOR_WORK_OFF)
  2127. {
  2128. DecimalToASCII( setParamInfo.totalDose,tempBuf,3 );
  2129. Gui_DrawFont_GBK12( 80,6,BLACK,GRAY0,tempBuf );
  2130. tempInputDose = realTimeData.firstDose / 10;
  2131. DecimalToASCII( tempInputDose,tempBuf,2 );
  2132. Gui_DrawFont_GBK12( 80,3,BLACK,GRAY0,tempBuf );
  2133. Gui_DrawFont_GBK12( 92,3,BLACK,GRAY0,"." );
  2134. tempInputDose = realTimeData.firstDose % 10;
  2135. DecimalToASCII( tempInputDose,tempBuf,1 );
  2136. Gui_DrawFont_GBK12( 98,3,BLACK,GRAY0,tempBuf );
  2137. }
  2138. TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR;
  2139. if( EngineeringModeValue.pressure_switch == 0) //显示打开的话,显示的内容
  2140. {
  2141. //---------------测试-------------
  2142. //电机电流值
  2143. DecimalToASCII( ElectricityData,tempBuf,4 );//realTimeData.pressure2
  2144. Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf );
  2145. //红外传感器值
  2146. DecimalToASCII( BubbleData,tempBuf,4 );
  2147. Gui_DrawFont_GBK12( 61,1,BLACK,GRAY0,tempBuf );
  2148. //发送条数
  2149. DecimalToASCII( send_cont,tempBuf,4 );
  2150. Gui_DrawFont_GBK12( 106,1,BLACK,GRAY0,tempBuf );
  2151. //-----------------------------
  2152. }
  2153. }
  2154. }
  2155. }
  2156. }
  2157. /*************************************************************************************
  2158. * Function: DrawRunMainPicture
  2159. * Object: 绘制运行主画面
  2160. * 输入: 无
  2161. * 输出: 无
  2162. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2163. uint16_t tempInputDose = 0;临时计算变量
  2164. **************************************************************************************/
  2165. void DrawRunMainPicture( void )
  2166. {
  2167. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2168. uint16_t tempInputDose = 0;
  2169. if(emSysWorkStep == EnterRunMain)
  2170. {
  2171. if( emPictureRunState == FirstEnter )
  2172. {
  2173. LCDClear( GRAY0 );
  2174. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2175. {
  2176. DisplayHeader(0xff,0xff,82);//锁2
  2177. }
  2178. else
  2179. {
  2180. DisplayHeader(0x00,0x00,82);//清锁2
  2181. }
  2182. if( realTimeData.stateRun == Pause )
  2183. {
  2184. DisplayHeader(0xff,0xff,81);//暂停
  2185. }
  2186. else
  2187. {
  2188. DisplayHeader(0x00,0x00,81);//暂停
  2189. }
  2190. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2191. {
  2192. DisplayHeader(0xff,0xff,34);//呼叫
  2193. }
  2194. else
  2195. {
  2196. DisplayHeader(0x00,0x00,34);//呼叫
  2197. }
  2198. DrawBatteryDisplay();//电池
  2199. DrawSignalDisplay();//信号
  2200. DrawSilenceDisplay();//静音
  2201. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"总量" );
  2202. DecimalToASCII( setParamInfo.totalDose,tempBuf,3 );
  2203. Gui_DrawFont_GBK12( 29,7,BLACK,GRAY0,tempBuf );
  2204. Gui_DrawFont_GBK12( 48,7,BLACK,GRAY0,"ml" );
  2205. Gui_DrawFont_GBK12( 60,7,BLACK,GRAY0,"已输" );
  2206. tempInputDose = realTimeData.inputDose / 10;
  2207. DecimalToASCII( tempInputDose,tempBuf,3 );
  2208. Gui_DrawFont_GBK12( 86,7,BLACK,GRAY0,tempBuf );
  2209. Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,"." );
  2210. tempInputDose = realTimeData.inputDose % 10;
  2211. DecimalToASCII( tempInputDose,tempBuf,1 );
  2212. Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,tempBuf );
  2213. Gui_DrawFont_GBK12( 119,7,BLACK,GRAY0,"ml" );
  2214. Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"锁时" );
  2215. DecimalToASCII( realTimeData.lockTime,tempBuf,2 );
  2216. Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf );
  2217. Gui_DrawFont_GBK12( 42,4,BLACK,GRAY0,"min" );
  2218. Gui_DrawFont_GBK12( 60,4,BLACK,GRAY0,"追加" );
  2219. tempInputDose = runParamInfo.superaddition / 10;
  2220. DecimalToASCII( tempInputDose,tempBuf,2 );
  2221. Gui_DrawFont_GBK12( 89,4,BLACK,GRAY0,tempBuf );
  2222. Gui_DrawFont_GBK12( 101,4,BLACK,GRAY0,"." );
  2223. tempInputDose = runParamInfo.superaddition % 10;
  2224. DecimalToASCII( tempInputDose,tempBuf,1 );
  2225. Gui_DrawFont_GBK12( 107,4,BLACK,GRAY0,tempBuf );
  2226. Gui_DrawFont_GBK12( 119,4,BLACK,GRAY0,"ml" );
  2227. if( EngineeringModeValue.pressure_switch == 1) //显示关闭的话,显示正常的参数
  2228. {
  2229. Gui_DrawFont_GBK12( 60,1,BLACK,GRAY0,"持续" );
  2230. tempInputDose = runParamInfo.continueDose / 10;
  2231. DecimalToASCII( tempInputDose,tempBuf,2 );
  2232. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf );
  2233. Gui_DrawFont_GBK12( 96,1,BLACK,GRAY0,"." );
  2234. tempInputDose = runParamInfo.continueDose % 10;
  2235. DecimalToASCII( tempInputDose,tempBuf,1 );
  2236. Gui_DrawFont_GBK12( 102,1,BLACK,GRAY0,tempBuf );
  2237. Gui_DrawFont_GBK12( 108,1,BLACK,GRAY0,"ml/h" );
  2238. if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET )
  2239. {
  2240. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"无效" );
  2241. DecimalToASCII( realTimeData.invalidCount,tempBuf,3 );
  2242. }
  2243. else
  2244. {
  2245. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"有效" );
  2246. DecimalToASCII( realTimeData.validCount,tempBuf,3 );
  2247. }
  2248. Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf );
  2249. }
  2250. /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET )
  2251. {
  2252. switch( modifyStep )
  2253. {
  2254. case 1:
  2255. DisplayHeader(0x00,0x00,8);//进度条
  2256. DisplayHeader(0xff,0xff,5);//进度条
  2257. modifyStep = 2;
  2258. break;
  2259. case 2:
  2260. DisplayHeader(0xff,0xff,6);//进度条
  2261. modifyStep = 3;
  2262. break;
  2263. case 3:
  2264. DisplayHeader(0xff,0xff,7);//进度条
  2265. modifyStep = 4;
  2266. break;
  2267. case 4:
  2268. DisplayHeader(0xff,0xff,8);//进度条
  2269. modifyStep = 1;
  2270. break;
  2271. default:break;
  2272. }
  2273. TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR;
  2274. }*/
  2275. emPictureRunState = Update;
  2276. }
  2277. else//只更新剩余量数据信息
  2278. {
  2279. if(motorWorkState == MOTOR_WORK_OFF)
  2280. {
  2281. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2282. {
  2283. DisplayHeader(0xff,0xff,82);//锁2
  2284. }
  2285. else
  2286. {
  2287. DisplayHeader(0x00,0x00,82);//清锁2
  2288. }
  2289. if( realTimeData.stateRun == Pause )
  2290. {
  2291. DisplayHeader(0xff,0xff,81);//暂停
  2292. }
  2293. else
  2294. {
  2295. DisplayHeader(0x00,0x00,81);//暂停
  2296. }
  2297. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2298. {
  2299. DisplayHeader(0xff,0xff,34);//呼叫
  2300. }
  2301. else
  2302. {
  2303. DisplayHeader(0x00,0x00,34);//呼叫
  2304. }
  2305. DrawBatteryDisplay();//电池
  2306. DrawSignalDisplay();//信号
  2307. DrawSilenceDisplay();//静音
  2308. // if(motorWorkState == MOTOR_WORK_ON)
  2309. // {
  2310. // return;
  2311. // }
  2312. /* if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET )
  2313. {
  2314. switch( modifyStep )
  2315. {
  2316. case 1:
  2317. DisplayHeader(0x00,0x00,8);//进度条
  2318. DisplayHeader(0xff,0xff,5);//进度条
  2319. modifyStep = 2;
  2320. break;
  2321. case 2:
  2322. DisplayHeader(0xff,0xff,6);//进度条
  2323. modifyStep = 3;
  2324. break;
  2325. case 3:
  2326. DisplayHeader(0xff,0xff,7);//进度条
  2327. modifyStep = 4;
  2328. break;
  2329. case 4:
  2330. DisplayHeader(0xff,0xff,8);//进度条
  2331. modifyStep = 1;
  2332. break;
  2333. default:break;
  2334. }
  2335. TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR;
  2336. }*/
  2337. DecimalToASCII( setParamInfo.totalDose,tempBuf,3 );
  2338. Gui_DrawFont_GBK12( 29,7,BLACK,GRAY0,tempBuf );
  2339. tempInputDose = realTimeData.inputDose / 10;
  2340. DecimalToASCII( tempInputDose,tempBuf,3 );
  2341. Gui_DrawFont_GBK12( 86,7,BLACK,GRAY0,tempBuf );
  2342. Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,"." );
  2343. tempInputDose = realTimeData.inputDose % 10;
  2344. DecimalToASCII( tempInputDose,tempBuf,1 );
  2345. Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,tempBuf );
  2346. if( ( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_SET ) )//锁时数值要闪烁
  2347. {
  2348. // TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_WAIT;
  2349. Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0," ");
  2350. // Delay_ms( 300 );
  2351. }
  2352. else if((( TaskSchedulerFlag.pcaLockTimeFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_WSET ))
  2353. ||(TaskSchedulerFlag.PCATimerFlashFlag == TASK_FLAG_CLEAR))
  2354. {
  2355. // TaskSchedulerFlag.PCATimerFlashFlag = TASK_FLAG_CLEAR;
  2356. DecimalToASCII( realTimeData.lockTime,tempBuf,2 );
  2357. Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf );
  2358. }
  2359. // DecimalToASCII( realTimeData.lockTime,tempBuf,2 );
  2360. // Gui_DrawFont_GBK12( 29,4,BLACK,GRAY0,tempBuf );
  2361. tempInputDose = runParamInfo.superaddition / 10;
  2362. DecimalToASCII( tempInputDose,tempBuf,2 );
  2363. Gui_DrawFont_GBK12( 89,4,BLACK,GRAY0,tempBuf );
  2364. Gui_DrawFont_GBK12( 101,4,BLACK,GRAY0,"." );
  2365. tempInputDose = runParamInfo.superaddition % 10;
  2366. DecimalToASCII( tempInputDose,tempBuf,1 );
  2367. Gui_DrawFont_GBK12( 107,4,BLACK,GRAY0,tempBuf );
  2368. if( EngineeringModeValue.pressure_switch == 1) //显示关闭的话,显示正常的参数
  2369. {
  2370. tempInputDose = runParamInfo.continueDose / 10;
  2371. DecimalToASCII( tempInputDose,tempBuf,2 );
  2372. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf );
  2373. Gui_DrawFont_GBK12( 96,1,BLACK,GRAY0,"." );
  2374. tempInputDose = runParamInfo.continueDose % 10;
  2375. DecimalToASCII( tempInputDose,tempBuf,1 );
  2376. Gui_DrawFont_GBK12( 102,1,BLACK,GRAY0,tempBuf );
  2377. if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET )
  2378. {
  2379. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"无效" );
  2380. DecimalToASCII( realTimeData.invalidCount,tempBuf,3 );
  2381. }
  2382. else
  2383. {
  2384. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"有效" );
  2385. DecimalToASCII( realTimeData.validCount,tempBuf,3 );
  2386. }
  2387. // if( ( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET ) )//无效数值要闪烁
  2388. if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET)
  2389. {
  2390. // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT;
  2391. Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0," ");
  2392. // Delay_ms( 300 );
  2393. }
  2394. else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET ))
  2395. // else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR))
  2396. // ||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR))
  2397. {
  2398. // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR;
  2399. Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf );
  2400. }
  2401. // Gui_DrawFont_GBK12( 29,1,BLACK,GRAY0,tempBuf );
  2402. }
  2403. else
  2404. {
  2405. //---------------测试-------------
  2406. // DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2
  2407. // Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf );
  2408. // Gui_DrawFont_GBK12( 40,1,BLACK,GRAY0,"kpa" );
  2409. //电机电流值
  2410. DecimalToASCII( ElectricityData,tempBuf,4 );//realTimeData.pressure2
  2411. Gui_DrawFont_GBK12( 106,1,BLACK,GRAY0,tempBuf );
  2412. //红外传感器值
  2413. DecimalToASCII( BubbleData,tempBuf,4 );
  2414. Gui_DrawFont_GBK12( 61,1,BLACK,GRAY0,tempBuf );
  2415. //发送条数
  2416. DecimalToASCII( send_cont,tempBuf,4 );
  2417. Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf );
  2418. // Gui_DrawFont_GBK12( 94,1,BLACK,GRAY0,"ci" );
  2419. //-----------------------------*/
  2420. //----------lorawan页面显示测试--------------------------
  2421. /* if(LoRa_Node.Join == 1)
  2422. {
  2423. DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2
  2424. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"网络已连接" );
  2425. //Gui_DrawFont_GBK12( 40,1,BLACK,GRAY0,"kpa" );
  2426. }
  2427. else
  2428. {
  2429. DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2
  2430. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"网络未连接" );
  2431. }*/
  2432. //DecimalToASCII( ElectricityOffData,tempBuf,4 );
  2433. //DecimalToASCII( send_cont,tempBuf,4 );
  2434. //DecimalToASCII( self_adaption_Pressure,tempBuf,4 );//realTimeData.pressure2
  2435. // Gui_DrawFont_GBK12( 70,1,BLACK,GRAY0,tempBuf );
  2436. // Gui_DrawFont_GBK12( 94,1,BLACK,GRAY0,"次" );
  2437. }
  2438. }
  2439. }
  2440. }
  2441. }
  2442. /*************************************************************************************
  2443. * Function: DrawRunMainPicture
  2444. * Object: 绘制运行压力画面
  2445. * 输入: 无
  2446. * 输出: 无
  2447. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2448. **************************************************************************************/
  2449. void DrawRunPressurePicture( void )
  2450. {
  2451. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2452. uint8_t i;
  2453. // if(motorWorkState == MOTOR_WORK_ON)
  2454. // {
  2455. // return;
  2456. // }
  2457. if( emPictureRunState == FirstEnter )
  2458. {
  2459. LCDClear( GRAY0 );
  2460. DrawBatteryDisplay();//电池
  2461. DrawSignalDisplay();//信号
  2462. DrawSilenceDisplay();//静音
  2463. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2464. {
  2465. DisplayHeader(0xff,0xff,82);//锁2
  2466. }
  2467. else
  2468. {
  2469. DisplayHeader(0x00,0x00,82);//清锁2
  2470. }
  2471. if( realTimeData.stateRun == Pause )
  2472. {
  2473. DisplayHeader(0xff,0xff,81);//暂停
  2474. }
  2475. else
  2476. {
  2477. DisplayHeader(0x00,0x00,81);//暂停
  2478. }
  2479. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"kp" );
  2480. Gui_DrawFont_GBK12( 90,1,BLACK,GRAY0,"t" );
  2481. Gui_DrawFont_GBK16( 17,7,BLACK,GRAY0,"^" );
  2482. Gui_DrawFont_GBK16( 80,1,BLACK,GRAY0,">" );
  2483. for( i = 0; i < 60; i++)
  2484. {
  2485. Gui_DrawPoint(20 + i,1,0x01);
  2486. }
  2487. for( i = 1; i < 7; i++)
  2488. {
  2489. Gui_DrawPoint(20,i,0xff);
  2490. }
  2491. // for( i = 1 ; i < 8 ; i++ )
  2492. // {
  2493. // Gui_DrawFont_GBK8( 16,i,BLACK,GRAY0,"|" );
  2494. // // Gui_DrawFont_GBK12( 16 + i * 6,1,BLACK,GRAY0,"_" );
  2495. // }
  2496. // for( i = 0 ; i < 8 ; i++ )
  2497. // {
  2498. // Gui_DrawFont_GBK8( 16 + i * 6,1,BLACK,GRAY0,"_" );
  2499. // }
  2500. Gui_DrawFont_GBK12( 90,7,BLACK,GRAY0,"压 力" );
  2501. DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2
  2502. Gui_DrawFont_GBK12( 84,4,BLACK,GRAY0,tempBuf );
  2503. Gui_DrawFont_GBK12( 110,4,BLACK,GRAY0,"kpa" );
  2504. //---------------测试自适应压力值----------
  2505. //DecimalToASCII( ces_cong,tempBuf,4 );
  2506. DecimalToASCII( self_adaption_Pressure,tempBuf,4 );//realTimeData.pressure2
  2507. Gui_DrawFont_GBK12( 84,2,BLACK,GRAY0,tempBuf );
  2508. Gui_DrawFont_GBK12( 110,2,BLACK,GRAY0,"kpa" );
  2509. DecimalToASCII( ces_cong,tempBuf,4 );
  2510. //DecimalToASCII( self_adaption_Pressure,tempBuf,4 );//realTimeData.pressure2
  2511. Gui_DrawFont_GBK12( 84,1,BLACK,GRAY0,tempBuf );
  2512. Gui_DrawFont_GBK12( 110,1,BLACK,GRAY0,"kpa" );
  2513. //----------------------------------------
  2514. emPictureRunState = Update;
  2515. }
  2516. else
  2517. {
  2518. DrawBatteryDisplay();//电池
  2519. DrawSignalDisplay();//信号
  2520. DrawSilenceDisplay();//静音
  2521. DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//realTimeData.pressure2
  2522. Gui_DrawFont_GBK12( 84,4,BLACK,GRAY0,tempBuf );
  2523. }
  2524. }
  2525. /*************************************************************************************
  2526. * Function: DrawPauseMainPicture
  2527. * Object: 绘制暂停主画面
  2528. * 输入: 无
  2529. * 输出: 无
  2530. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2531. **************************************************************************************/
  2532. void DrawPauseMainPicture( void )
  2533. {
  2534. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2535. LCDClear( GRAY0 );
  2536. Gui_DrawFont_GBK12( 115,7,BLACK,GRAY0,"总量" );
  2537. DecimalToASCII( setParamInfo.totalDose,tempBuf,3 );
  2538. Gui_DrawFont_GBK12( 97,7,BLACK,GRAY0,tempBuf );
  2539. Gui_DrawFont_GBK12( 77,7,BLACK,GRAY0,"ml" );
  2540. Gui_DrawFont_GBK12( 55,7,BLACK,GRAY0,"已输入" );
  2541. DecimalToASCII( realTimeData.inputDose,tempBuf,2 );
  2542. Gui_DrawFont_GBK12( 22,7,BLACK,GRAY0,tempBuf );
  2543. Gui_DrawFont_GBK12( 6,7,BLACK,GRAY0,"ml" );
  2544. Gui_DrawFont_GBK12( 115,4,BLACK,GRAY0,"锁时" );
  2545. DecimalToASCII( runParamInfo.lockTime,tempBuf,2 );
  2546. Gui_DrawFont_GBK12( 96,4,BLACK,GRAY0,tempBuf );
  2547. Gui_DrawFont_GBK12( 83,4,BLACK,GRAY0,"min" );
  2548. Gui_DrawFont_GBK12( 55,4,BLACK,GRAY0,"追加量" );
  2549. DecimalToASCII( runParamInfo.superaddition,tempBuf,2 );
  2550. Gui_DrawFont_GBK12( 22,4,BLACK,GRAY0,tempBuf );
  2551. Gui_DrawFont_GBK12( 6,4,BLACK,GRAY0,"ml" );
  2552. Gui_DrawFont_GBK12( 115,1,BLACK,GRAY0,"持续" );
  2553. DecimalToASCII( runParamInfo.continueDose,tempBuf,2 );
  2554. Gui_DrawFont_GBK12( 96,1,BLACK,GRAY0,tempBuf );
  2555. Gui_DrawFont_GBK12( 83,1,BLACK,GRAY0,"ml/h" );
  2556. Gui_DrawFont_GBK12( 43,1,BLACK,GRAY0,"次数" );
  2557. DecimalToASCII( realTimeData.validCount,tempBuf,2 );
  2558. Gui_DrawFont_GBK12( 22,1,BLACK,GRAY0,tempBuf );
  2559. }
  2560. /*************************************************************************************
  2561. * Function: DrawPCAPicture
  2562. * Object: 绘制PCA画面
  2563. * 输入: 无
  2564. * 输出: 无
  2565. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2566. uint16_t tempInputDose = 0;临时计算变量
  2567. **************************************************************************************/
  2568. void DrawPCAPicture( void )
  2569. {
  2570. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2571. uint16_t tempInputDose = 0;
  2572. if(emSysWorkStep == EnterRunMain)
  2573. {
  2574. if( emPictureRunState == FirstEnter )
  2575. {
  2576. LCDClear( GRAY0 );
  2577. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2578. {
  2579. DisplayHeader(0xff,0xff,82);//锁2
  2580. }
  2581. else
  2582. {
  2583. DisplayHeader(0x00,0x00,82);//清锁2
  2584. }
  2585. if( realTimeData.stateRun == Pause )
  2586. {
  2587. DisplayHeader(0xff,0xff,81);//暂停
  2588. }
  2589. else
  2590. {
  2591. DisplayHeader(0x00,0x00,81);//暂停
  2592. }
  2593. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2594. {
  2595. DisplayHeader(0xff,0xff,34);//呼叫
  2596. }
  2597. else
  2598. {
  2599. DisplayHeader(0x00,0x00,34);//呼叫
  2600. }
  2601. DrawBatteryDisplay();//电池
  2602. DrawSignalDisplay();//信号
  2603. DrawSilenceDisplay();//静音
  2604. Gui_DrawFont_GBK12( 16,7,BLACK,GRAY0,"已输入量" );
  2605. tempInputDose = realTimeData.inputDose / 10;
  2606. DecimalToASCII( tempInputDose,tempBuf,3 );
  2607. Gui_DrawFont_GBK12( 79,7,BLACK,GRAY0,tempBuf );
  2608. Gui_DrawFont_GBK12( 97,7,BLACK,GRAY0,"." );//91
  2609. tempInputDose = realTimeData.inputDose % 10;
  2610. DecimalToASCII( tempInputDose,tempBuf,1 );
  2611. Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,tempBuf );
  2612. Gui_DrawFont_GBK12( 110,7,BLACK,GRAY0,"ml" );
  2613. Gui_DrawFont_GBK12( 16,5,BLACK,GRAY0,"自 控 量" );
  2614. tempInputDose = realTimeData.superaddition / 10;
  2615. DecimalToASCII( tempInputDose,tempBuf,2 );
  2616. Gui_DrawFont_GBK12( 79,5,BLACK,GRAY0,tempBuf );
  2617. Gui_DrawFont_GBK12( 91,5,BLACK,GRAY0,"." );
  2618. tempInputDose = realTimeData.superaddition % 10;
  2619. DecimalToASCII( tempInputDose,tempBuf,1 );
  2620. Gui_DrawFont_GBK12( 97,5,BLACK,GRAY0,tempBuf );
  2621. Gui_DrawFont_GBK12( 103,5,BLACK,GRAY0,"ml" );
  2622. if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET )
  2623. {
  2624. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"无效次数" );
  2625. DecimalToASCII( realTimeData.invalidCount,tempBuf,3 );
  2626. }
  2627. else
  2628. {
  2629. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"有效次数" );
  2630. DecimalToASCII( realTimeData.validCount,tempBuf,3 );
  2631. }
  2632. Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0,tempBuf );
  2633. /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET )
  2634. {
  2635. switch( modifyStep )
  2636. {
  2637. case 1:
  2638. DisplayHeader(0x00,0x00,8);//进度条
  2639. DisplayHeader(0xff,0xff,5);//进度条
  2640. modifyStep = 2;
  2641. break;
  2642. case 2:
  2643. DisplayHeader(0xff,0xff,6);//进度条
  2644. modifyStep = 3;
  2645. break;
  2646. case 3:
  2647. DisplayHeader(0xff,0xff,7);//进度条
  2648. modifyStep = 4;
  2649. break;
  2650. case 4:
  2651. DisplayHeader(0xff,0xff,8);//进度条
  2652. modifyStep = 1;
  2653. break;
  2654. default:break;
  2655. }
  2656. TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR;
  2657. }*/
  2658. emPictureRunState = Update;
  2659. }
  2660. else//只更新剩余量数据信息
  2661. {
  2662. if(motorWorkState == MOTOR_WORK_OFF)
  2663. {
  2664. if( TaskSchedulerFlag.lockDispFlag == TASK_FLAG_SET )
  2665. {
  2666. DisplayHeader(0xff,0xff,82);//锁2
  2667. }
  2668. else
  2669. {
  2670. DisplayHeader(0x00,0x00,82);//清锁2
  2671. }
  2672. if( realTimeData.stateRun == Pause )
  2673. {
  2674. DisplayHeader(0xff,0xff,81);//暂停
  2675. }
  2676. else
  2677. {
  2678. DisplayHeader(0x00,0x00,81);//暂停
  2679. }
  2680. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2681. {
  2682. DisplayHeader(0xff,0xff,34);//呼叫
  2683. }
  2684. else
  2685. {
  2686. DisplayHeader(0x00,0x00,34);//呼叫
  2687. }
  2688. // if(motorWorkState == MOTOR_WORK_ON)
  2689. // {
  2690. // return;
  2691. // }
  2692. DrawBatteryDisplay();//电池
  2693. DrawSignalDisplay();//信号
  2694. DrawSilenceDisplay();//静音
  2695. tempInputDose = realTimeData.inputDose / 10;
  2696. DecimalToASCII( tempInputDose,tempBuf,3 );
  2697. Gui_DrawFont_GBK12( 79,7,BLACK,GRAY0,tempBuf );
  2698. Gui_DrawFont_GBK12( 97,7,BLACK,GRAY0,"." );
  2699. tempInputDose = realTimeData.inputDose % 10;
  2700. DecimalToASCII( tempInputDose,tempBuf,1 );
  2701. Gui_DrawFont_GBK12( 104,7,BLACK,GRAY0,tempBuf );
  2702. tempInputDose = realTimeData.superaddition / 10;
  2703. DecimalToASCII( tempInputDose,tempBuf,2 );
  2704. Gui_DrawFont_GBK12( 79,5,BLACK,GRAY0,tempBuf );
  2705. Gui_DrawFont_GBK12( 91,5,BLACK,GRAY0,"." );
  2706. tempInputDose = realTimeData.superaddition % 10;
  2707. DecimalToASCII( tempInputDose,tempBuf,1 );
  2708. Gui_DrawFont_GBK12( 97,5,BLACK,GRAY0,tempBuf );
  2709. if( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET )
  2710. {
  2711. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"无效次数" );
  2712. DecimalToASCII( realTimeData.invalidCount,tempBuf,3 );
  2713. }
  2714. else
  2715. {
  2716. Gui_DrawFont_GBK12( 16,3,BLACK,GRAY0,"有效次数" );
  2717. DecimalToASCII( realTimeData.validCount,tempBuf,3 );
  2718. }
  2719. // if( ( TaskSchedulerFlag.pcaCountDispFlag == TASK_FLAG_SET ) && ( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET ) )//无效数值要闪烁
  2720. if(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_SET)
  2721. {
  2722. // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_WAIT;
  2723. Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0," ");
  2724. // Delay_ms( 300 );
  2725. }
  2726. else if(( TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_WSET )||(TaskSchedulerFlag.lcdFlashFlag == TASK_FLAG_CLEAR))
  2727. {
  2728. // TaskSchedulerFlag.lcdFlashFlag = TASK_FLAG_CLEAR;
  2729. Gui_DrawFont_GBK12( 79,3,BLACK,GRAY0,tempBuf );
  2730. }
  2731. if( EngineeringModeValue.pressure_switch == 0) //显示打开的话,显示的内容
  2732. {
  2733. //---------------测试-------------
  2734. //电机电流值
  2735. DecimalToASCII( ElectricityData,tempBuf,4 );//realTimeData.pressure2
  2736. Gui_DrawFont_GBK12( 16,1,BLACK,GRAY0,tempBuf );
  2737. //红外传感器值
  2738. DecimalToASCII( BubbleData,tempBuf,4 );
  2739. Gui_DrawFont_GBK12( 61,1,BLACK,GRAY0,tempBuf );
  2740. //发送条数
  2741. DecimalToASCII( send_cont,tempBuf,4 );
  2742. Gui_DrawFont_GBK12( 106,1,BLACK,GRAY0,tempBuf );
  2743. //-----------------------------
  2744. }
  2745. /*if( TaskSchedulerFlag.rtdUpdateFlag == TASK_FLAG_SET )
  2746. {
  2747. switch( modifyStep )
  2748. {
  2749. case 1:
  2750. DisplayHeader(0x00,0x00,8);//进度条
  2751. DisplayHeader(0xff,0xff,5);//进度条
  2752. modifyStep = 2;
  2753. break;
  2754. case 2:
  2755. DisplayHeader(0xff,0xff,6);//进度条
  2756. modifyStep = 3;
  2757. break;
  2758. case 3:
  2759. DisplayHeader(0xff,0xff,7);//进度条
  2760. modifyStep = 4;
  2761. break;
  2762. case 4:
  2763. DisplayHeader(0xff,0xff,8);//进度条
  2764. modifyStep = 1;
  2765. break;
  2766. default:break;
  2767. }
  2768. TaskSchedulerFlag.rtdUpdateFlag = TASK_FLAG_CLEAR;
  2769. }*/
  2770. }
  2771. }
  2772. }
  2773. }
  2774. /*************************************************************************************
  2775. * Function: DrawLockPasswordPicture
  2776. * Object: 绘主锁定密码画面
  2777. * 输入: 无
  2778. * 输出: 无
  2779. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2780. **************************************************************************************/
  2781. void DrawLockPasswordPicture( void )
  2782. {
  2783. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2784. uint8_t i;
  2785. if( emPictureRunState == FirstEnter )
  2786. {
  2787. LCDClear( GRAY0 );
  2788. DrawBatteryDisplay();//电池
  2789. DrawSignalDisplay();//信号
  2790. DrawSilenceDisplay();//静音
  2791. DisplayHeader(0xff,0xff,92);//锁1
  2792. Gui_DrawFont_GBK16( 33,6,BLACK,GRAY0,"锁定密码" );
  2793. Gui_DrawFont_GBK16( 53,2,BLACK,GRAY0,"_" );
  2794. for( i = 0 ; i < 3 ; i++ )
  2795. {
  2796. verifyPasswordBuf[i] = 0;
  2797. DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 );
  2798. Gui_DrawFont_GBK16( 53 + i * 8,3,BLACK,GRAY0,tempBuf );
  2799. }
  2800. emPictureRunState = Update;
  2801. }
  2802. else
  2803. {
  2804. switch(modifyStep)
  2805. {
  2806. case 1:
  2807. Gui_DrawFont_GBK16( 53 + ( 1 - 1 ) * 8,2,BLACK,GRAY0,"_" );
  2808. Gui_DrawFont_GBK16( 53 + ( 2 - 1 ) * 8,2,BLACK,GRAY0," " );
  2809. Gui_DrawFont_GBK16( 53 + ( 3 - 1 ) * 8,2,BLACK,GRAY0," " );
  2810. break;
  2811. case 2:
  2812. Gui_DrawFont_GBK16( 53 + ( 1 - 1 ) * 8,2,BLACK,GRAY0," " );
  2813. Gui_DrawFont_GBK16( 53 + ( 2 - 1 ) * 8,2,BLACK,GRAY0,"_" );
  2814. Gui_DrawFont_GBK16( 53 + ( 3 - 1 ) * 8,2,BLACK,GRAY0," " );
  2815. break;
  2816. case 3:
  2817. Gui_DrawFont_GBK16( 53 + ( 1 - 1 ) * 8,2,BLACK,GRAY0," " );
  2818. Gui_DrawFont_GBK16( 53 + ( 2 - 1 ) * 8,2,BLACK,GRAY0," " );
  2819. Gui_DrawFont_GBK16( 53 + ( 3 - 1 ) * 8,2,BLACK,GRAY0,"_" );
  2820. break;
  2821. default:break;
  2822. }
  2823. for( i = 0 ; i < 3 ; i++ )
  2824. {
  2825. DecimalToASCII( verifyPasswordBuf[i],tempBuf,1 );
  2826. Gui_DrawFont_GBK16( 53 + i * 8,3,BLACK,GRAY0,tempBuf );
  2827. }
  2828. }
  2829. }
  2830. /*************************************************************************************
  2831. * Function: DrawTransfuseOverPicture
  2832. * Object: 绘制输注完毕画面
  2833. * 输入: 无
  2834. * 输出: 无
  2835. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2836. uint16_t tempInputDose = 0;临时计算变量
  2837. **************************************************************************************/
  2838. void DrawTransfuseOverPicture( void )
  2839. {
  2840. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2841. uint16_t tempInputDose = 0;
  2842. LCDClear( GRAY0 );
  2843. DrawBatteryDisplay();//电池
  2844. DrawSignalDisplay();//信号
  2845. DrawSilenceDisplay();//静音
  2846. if( TaskSchedulerFlag.callFunctionFlag == TASK_FLAG_SET )
  2847. {
  2848. DisplayHeader(0xff,0xff,34);//呼叫
  2849. }
  2850. else
  2851. {
  2852. DisplayHeader(0x00,0x00,34);//呼叫
  2853. }
  2854. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  2855. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,tempBuf );
  2856. Gui_DrawFont_GBK12( 16,7,BLACK,GRAY0,"月" );
  2857. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  2858. Gui_DrawFont_GBK12( 28,7,BLACK,GRAY0,tempBuf );
  2859. Gui_DrawFont_GBK12( 40,7,BLACK,GRAY0,"日" );
  2860. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  2861. Gui_DrawFont_GBK12( 52,7,BLACK,GRAY0,tempBuf );
  2862. Gui_DrawFont_GBK12( 64,7,BLACK,GRAY0,":" );
  2863. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  2864. Gui_DrawFont_GBK12( 70,7,BLACK,GRAY0,tempBuf );
  2865. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"输液结束!!" );
  2866. Gui_DrawFont_GBK12( 29,3,BLACK,GRAY0,"已输入" );
  2867. tempInputDose = realTimeData.inputDose / 10;
  2868. DecimalToASCII( tempInputDose,tempBuf,3 );
  2869. Gui_DrawFont_GBK12( 65,3,BLACK,GRAY0,tempBuf );
  2870. Gui_DrawFont_GBK12( 83,3,BLACK,GRAY0,"." );
  2871. tempInputDose = realTimeData.inputDose % 10;
  2872. DecimalToASCII( tempInputDose,tempBuf,1 );
  2873. Gui_DrawFont_GBK12( 89,3,BLACK,GRAY0,tempBuf );
  2874. Gui_DrawFont_GBK12( 98,3,BLACK,GRAY0,"ml" );
  2875. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"追加量" );
  2876. // DecimalToASCII( realTimeData.superaddition,tempBuf,2 );
  2877. tempInputDose = realTimeData.superaddition / 10;
  2878. DecimalToASCII( tempInputDose,tempBuf,2 );
  2879. Gui_DrawFont_GBK12( 46,1,BLACK,GRAY0,tempBuf );
  2880. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"." );
  2881. tempInputDose = realTimeData.superaddition % 10;
  2882. DecimalToASCII( tempInputDose,tempBuf,1 );
  2883. Gui_DrawFont_GBK12( 64,1,BLACK,GRAY0,tempBuf );
  2884. Gui_DrawFont_GBK12( 72,1,BLACK,GRAY0,"ml" );
  2885. Gui_DrawFont_GBK12( 88,1,BLACK,GRAY0,"次数" );
  2886. DecimalToASCII( realTimeData.validCount,tempBuf,2 );
  2887. Gui_DrawFont_GBK12( 118,1,BLACK,GRAY0,tempBuf );
  2888. // SysHornToneTyoe = InfusionTone;//蜂鸣器-输入结束
  2889. // speakerWorkStep = emSpeakerNoneWork;
  2890. // TaskSchedulerFlag.speakerFlag = TASK_FLAG_WAIT;
  2891. // TaskSchedulerTimer.speakerWaitTimer = ONE_SECOND_TIMER;//在界面显示出来后,做1S延时 为下次进入蜂鸣器计时做准备
  2892. }
  2893. /*************************************************************************************
  2894. * Function: DrawAlarmDevicePicture
  2895. * Object: 绘制机械故障画面
  2896. * 输入: 无
  2897. * 输出: 无
  2898. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2899. **************************************************************************************/
  2900. void DrawAlarmDevicePicture( void )
  2901. {
  2902. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2903. LCDClear( GRAY0 );
  2904. DrawBatteryDisplay();//电池
  2905. DrawSignalDisplay();//信号
  2906. DrawSilenceDisplay();//静音
  2907. DisplayHeader(0x00,0x01,61);//报警
  2908. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  2909. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  2910. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  2911. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  2912. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  2913. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  2914. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  2915. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  2916. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  2917. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  2918. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  2919. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"机械故障!!" );
  2920. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  2921. }
  2922. /*************************************************************************************
  2923. * Function: DrawAlarmJamPicture
  2924. * Object: 绘制堵塞故障画面
  2925. * 输入: 无
  2926. * 输出: 无
  2927. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2928. **************************************************************************************/
  2929. void DrawAlarmJamPicture( void )
  2930. {
  2931. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2932. LCDClear( GRAY0 );
  2933. DrawBatteryDisplay();//电池
  2934. DrawSignalDisplay();//信号
  2935. DrawSilenceDisplay();//静音
  2936. DisplayHeader(0x00,0x01,61);//报警
  2937. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  2938. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  2939. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  2940. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  2941. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  2942. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  2943. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  2944. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  2945. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  2946. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  2947. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  2948. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"堵塞!!" );
  2949. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  2950. }
  2951. /*************************************************************************************
  2952. * Function: DrawAlarmMaxPicture
  2953. * Object: 绘制极限量故障画面
  2954. * 输入: 无
  2955. * 输出: 无
  2956. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2957. **************************************************************************************/
  2958. void DrawAlarmMaxPicture( void )
  2959. {
  2960. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2961. LCDClear( GRAY0 );
  2962. DrawBatteryDisplay();//电池
  2963. DrawSignalDisplay();//信号
  2964. DrawSilenceDisplay();//静音
  2965. DisplayHeader(0x00,0x01,61);//报警
  2966. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  2967. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  2968. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  2969. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  2970. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  2971. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  2972. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  2973. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  2974. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  2975. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  2976. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  2977. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"极限!!" );
  2978. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  2979. }
  2980. /*************************************************************************************
  2981. * Function: DrawAlarmMaxPicture
  2982. * Object: 绘制气泡无液报警画面
  2983. * 输入: 无
  2984. * 输出: 无
  2985. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  2986. **************************************************************************************/
  2987. void DrawAlarmBubblePicture( void )
  2988. {
  2989. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  2990. LCDClear( GRAY0 );
  2991. DrawBatteryDisplay();//电池
  2992. DrawSignalDisplay();//信号
  2993. DrawSilenceDisplay();//静音
  2994. DisplayHeader(0x00,0x01,61);//报警
  2995. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  2996. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  2997. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  2998. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  2999. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  3000. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  3001. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  3002. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  3003. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  3004. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  3005. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  3006. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"气泡无液!!" );
  3007. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  3008. }
  3009. /*************************************************************************************
  3010. * Function: DrawAlarmNonePillCasePicture
  3011. * Object: 绘制无药盒报警画面
  3012. * 输入: 无
  3013. * 输出: 无
  3014. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3015. **************************************************************************************/
  3016. void DrawAlarmNonePillCasePicture( void )
  3017. {
  3018. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3019. LCDClear( GRAY0 );
  3020. DrawBatteryDisplay();//电池
  3021. DrawSignalDisplay();//信号
  3022. DrawSilenceDisplay();//静音
  3023. DisplayHeader(0x00,0x01,61);//报警
  3024. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  3025. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  3026. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  3027. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  3028. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  3029. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  3030. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  3031. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  3032. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  3033. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  3034. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  3035. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"未装药盒!!" );
  3036. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  3037. }
  3038. /*************************************************************************************
  3039. * Function: DrawAlarmLowVoltPicture
  3040. * Object: 绘制低电压报警画面
  3041. * 输入: 无
  3042. * 输出: 无
  3043. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3044. **************************************************************************************/
  3045. void DrawAlarmLowVoltPicture( void )
  3046. {
  3047. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3048. LCDClear( GRAY0 );
  3049. DrawBatteryDisplay();//电池
  3050. DrawSignalDisplay();//信号
  3051. DrawSilenceDisplay();//静音
  3052. DisplayHeader(0x00,0x01,61);//报警
  3053. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  3054. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  3055. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  3056. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  3057. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  3058. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  3059. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  3060. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  3061. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  3062. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  3063. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  3064. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"电量耗尽!!" );
  3065. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  3066. }
  3067. /*************************************************************************************
  3068. * Function: DrawAlarmLineLostPicture
  3069. * Object: 绘制管路脱落警画面
  3070. * 输入: 无
  3071. * 输出: 无
  3072. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3073. **************************************************************************************/
  3074. void DrawAlarmLineLostPicture( void )
  3075. {
  3076. // uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3077. LCDClear( GRAY0 );
  3078. DrawBatteryDisplay();//电池
  3079. DrawSignalDisplay();//信号
  3080. DrawSilenceDisplay();//静音
  3081. DisplayHeader(0x00,0x01,61);//报警
  3082. /*DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  3083. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  3084. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  3085. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  3086. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  3087. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  3088. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  3089. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  3090. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  3091. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  3092. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );*/
  3093. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"管路脱落!!" );
  3094. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  3095. }
  3096. /*************************************************************************************
  3097. * Function: InputTotalPicture
  3098. * Object: 绘制输入量大于输入总量是,报警界面 2017.03.17
  3099. * 输入: 无
  3100. * 输出: 无
  3101. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3102. **************************************************************************************/
  3103. void InputTotalPicture( void )
  3104. {
  3105. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3106. LCDClear( GRAY0 );
  3107. DrawBatteryDisplay();//电池
  3108. DrawSignalDisplay();//信号
  3109. DrawSilenceDisplay();//静音
  3110. DisplayHeader(0x00,0x01,61);//报警
  3111. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  3112. Gui_DrawFont_GBK12( 4,6,BLACK,GRAY0,tempBuf );
  3113. Gui_DrawFont_GBK12( 16,6,BLACK,GRAY0,"月" );
  3114. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  3115. Gui_DrawFont_GBK12( 28,6,BLACK,GRAY0,tempBuf );
  3116. Gui_DrawFont_GBK12( 40,6,BLACK,GRAY0,"日" );
  3117. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  3118. Gui_DrawFont_GBK12( 52,6,BLACK,GRAY0,tempBuf );
  3119. Gui_DrawFont_GBK12( 64,6,BLACK,GRAY0,":" );
  3120. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  3121. Gui_DrawFont_GBK12( 70,6,BLACK,GRAY0,tempBuf );
  3122. Gui_DrawFont_GBK12( 19,3,BLACK,GRAY0,"总输注量报警!!" );
  3123. // sysPromptToneType = WarringTone;//蜂鸣器-故障报警
  3124. }
  3125. /*************************************************************************************
  3126. * Function: DrawEngineeringMode1Picture
  3127. * Object: 绘制工程模式1画面
  3128. * 输入: 无
  3129. * 输出: 无
  3130. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3131. **************************************************************************************/
  3132. void DrawEngineeringMode1Picture( void )
  3133. {
  3134. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3135. if( emPictureRunState == FirstEnter )
  3136. {
  3137. LCDClear( GRAY0 );
  3138. DrawBatteryDisplay();//电池
  3139. DrawSignalDisplay();//信号
  3140. DrawSilenceDisplay();//静音
  3141. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"病区位数");
  3142. DecimalToASCII( EngineeringModeValue.sickroomQty,tempBuf,1 );
  3143. Gui_DrawFont_GBK8Number( 73,7,BLACK,GRAY0,tempBuf );
  3144. Gui_DrawFont_GBK8Number( 73,6,BLACK,GRAY0,"_" );
  3145. Gui_DrawFont_GBK12( 83,7,BLACK,GRAY0,"网络");
  3146. if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )
  3147. {
  3148. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");
  3149. }
  3150. else
  3151. {
  3152. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");
  3153. }
  3154. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"病床位数");
  3155. DecimalToASCII( EngineeringModeValue.bedNOQty,tempBuf,1 );
  3156. Gui_DrawFont_GBK8Number( 73,5,BLACK,GRAY0,tempBuf );
  3157. Gui_DrawFont_GBK12( 83,5,BLACK,GRAY0,"查询");
  3158. if( EngineeringModeValue.seachState == 1 )
  3159. {
  3160. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关");
  3161. }
  3162. else
  3163. {
  3164. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开");
  3165. }
  3166. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"自控流速");
  3167. DecimalToASCII( EngineeringModeValue.selfcontrol,tempBuf,3 );
  3168. Gui_DrawFont_GBK8Number( 61,3,BLACK,GRAY0,tempBuf );
  3169. Gui_DrawFont_GBK12( 83,3,BLACK,GRAY0,"密码");
  3170. if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )
  3171. {
  3172. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关");
  3173. }
  3174. else
  3175. {
  3176. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开");
  3177. }
  3178. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"住院号位数");
  3179. DecimalToASCII( EngineeringModeValue.hospitalNOQty,tempBuf,2 );
  3180. Gui_DrawFont_GBK8Number( 67,1,BLACK,GRAY0,tempBuf );
  3181. emPictureRunState = Update;
  3182. }
  3183. else
  3184. {
  3185. DrawBatteryDisplay();//电池
  3186. DrawSignalDisplay();//信号
  3187. DrawSilenceDisplay();//静音
  3188. switch( emEngineeringMode1Choose )
  3189. {
  3190. case SickroomQty:
  3191. Gui_DrawFont_GBK8Number( 73,6,BLACK,GRAY0,"_" );//病区
  3192. DecimalToASCII( EngineeringModeValue.sickroomQty,tempBuf,1 );
  3193. Gui_DrawFont_GBK8Number( 73,7,BLACK,GRAY0,tempBuf );
  3194. if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )//网络
  3195. {
  3196. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");
  3197. }
  3198. else
  3199. {
  3200. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");
  3201. }
  3202. break;
  3203. case NetworkState:
  3204. Gui_DrawFont_GBK8Number( 73,6,BLACK,GRAY0," " );//病区
  3205. if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )//网络
  3206. {
  3207. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"羊");//关
  3208. }
  3209. else
  3210. {
  3211. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"丰");//开
  3212. }
  3213. Gui_DrawFont_GBK8Number( 73,4,BLACK,GRAY0," " );//病床
  3214. break;
  3215. case BedNOQty:
  3216. if( EngineeringModeValue.networkState == ENGINEERINGMODE_OFF )//网络
  3217. {
  3218. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");//关
  3219. }
  3220. else
  3221. {
  3222. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");//开
  3223. }
  3224. Gui_DrawFont_GBK8Number( 73,4,BLACK,GRAY0,"_" );//病床
  3225. DecimalToASCII( EngineeringModeValue.bedNOQty,tempBuf,1 );
  3226. Gui_DrawFont_GBK8Number( 73,5,BLACK,GRAY0,tempBuf );
  3227. if( EngineeringModeValue.seachState == 1 )//查询
  3228. {
  3229. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关");
  3230. }
  3231. else
  3232. {
  3233. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开");
  3234. }
  3235. break;
  3236. case SeachState:
  3237. Gui_DrawFont_GBK8Number( 73,4,BLACK,GRAY0," " );//病床
  3238. if( EngineeringModeValue.seachState == 1 )//查询
  3239. {
  3240. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"羊");
  3241. }
  3242. else
  3243. {
  3244. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"丰");
  3245. }
  3246. Gui_DrawFont_GBK8Number( 61,2,BLACK,GRAY0," " );//自控流量
  3247. break;
  3248. case Selfcontrol:
  3249. if( EngineeringModeValue.seachState == 1 )//查询
  3250. {
  3251. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关");
  3252. }
  3253. else
  3254. {
  3255. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开");
  3256. }
  3257. Gui_DrawFont_GBK8Number( 61,2,BLACK,GRAY0,"___" );//自控流量
  3258. DecimalToASCII( EngineeringModeValue.selfcontrol,tempBuf,3 );
  3259. Gui_DrawFont_GBK8Number( 61,3,BLACK,GRAY0,tempBuf );
  3260. if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )//密码
  3261. {
  3262. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关");
  3263. }
  3264. else
  3265. {
  3266. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开");
  3267. }
  3268. break;
  3269. case PasswordState:
  3270. Gui_DrawFont_GBK8Number( 61,2,BLACK,GRAY0," " );//自控流量
  3271. if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )//密码
  3272. {
  3273. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"羊");
  3274. }
  3275. else
  3276. {
  3277. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"丰");
  3278. }
  3279. Gui_DrawFont_GBK8Number( 67,0,BLACK,GRAY0," " );//住院号
  3280. break;
  3281. case HospitalNOQty:
  3282. if( EngineeringModeValue.passwordState == ENGINEERINGMODE_OFF )//密码
  3283. {
  3284. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关");
  3285. }
  3286. else
  3287. {
  3288. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开");
  3289. }
  3290. Gui_DrawFont_GBK8Number( 67,0,BLACK,GRAY0,"__" );//住院号
  3291. DecimalToASCII( EngineeringModeValue.hospitalNOQty,tempBuf,2 );
  3292. Gui_DrawFont_GBK8Number( 67,1,BLACK,GRAY0,tempBuf );
  3293. break;
  3294. default:break;
  3295. }
  3296. }
  3297. }
  3298. /*************************************************************************************
  3299. * Function: DrawEngineeringMode2Picture
  3300. * Object: 绘制工程模式2画面
  3301. * 输入: 无
  3302. * 输出: 无
  3303. * 备注:
  3304. **************************************************************************************/
  3305. void DrawEngineeringMode2Picture( void )
  3306. {
  3307. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3308. if( emPictureRunState == FirstEnter )
  3309. {
  3310. LCDClear( GRAY0 );
  3311. DrawBatteryDisplay();//电池
  3312. DrawSignalDisplay();//信号
  3313. DrawSilenceDisplay();//静音
  3314. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,"机械报警");
  3315. if( EngineeringModeValue.deviceAlarm == 1 )
  3316. {
  3317. Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"羊");//关带下划线用羊代替
  3318. }
  3319. else
  3320. {
  3321. Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"丰");//开带下划线用丰代替
  3322. }
  3323. Gui_DrawFont_GBK12( 80,7,BLACK,GRAY0,"声音");
  3324. if( EngineeringModeValue.silenceState == 0 )//修改于2019.02.13“1-0”
  3325. {
  3326. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");
  3327. }
  3328. else
  3329. {
  3330. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");
  3331. }
  3332. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"气泡无液");
  3333. if( EngineeringModeValue.bubbleAlarm == 1 )
  3334. {
  3335. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"关");
  3336. }
  3337. else
  3338. {
  3339. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"开");
  3340. }
  3341. Gui_DrawFont_GBK12( 80,5,BLACK,GRAY0,"扣合");
  3342. if( EngineeringModeValue.closedState == 1 )
  3343. {
  3344. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关");
  3345. }
  3346. else
  3347. {
  3348. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开");
  3349. }
  3350. if( EngineeringModeValue.automatic == 1 )
  3351. {
  3352. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量
  3353. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,"150");
  3354. }
  3355. else
  3356. {
  3357. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量
  3358. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,"001");
  3359. }
  3360. Gui_DrawFont_GBK12( 80,3,BLACK,GRAY0,"堵塞");
  3361. if( EngineeringModeValue.jamAlarm == 1 )
  3362. {
  3363. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关");
  3364. }
  3365. else
  3366. {
  3367. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开");
  3368. }
  3369. //-----------增加压力显示界面---------------
  3370. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"压力显示");
  3371. if( EngineeringModeValue.pressure_switch == 1 )
  3372. {
  3373. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"关");
  3374. }
  3375. else
  3376. {
  3377. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"开");
  3378. }
  3379. //-----------增加测试界面---------------
  3380. Gui_DrawFont_GBK12( 80,1,BLACK,GRAY0,"测试");
  3381. if(EngineeringModeValue.test == 1)
  3382. {
  3383. Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"关");
  3384. }
  3385. else
  3386. {
  3387. Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"开");
  3388. }
  3389. emPictureRunState = Update;
  3390. }
  3391. else
  3392. {
  3393. DrawBatteryDisplay();//电池
  3394. DrawSignalDisplay();//信号
  3395. DrawSilenceDisplay();//静音
  3396. switch( emEngineeringMode1Choose )
  3397. {
  3398. case DeviceAlarm:
  3399. if( EngineeringModeValue.deviceAlarm == 1 )//机械报警
  3400. {
  3401. Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"羊");//关带下划线用羊代替
  3402. }
  3403. else
  3404. {
  3405. Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"丰");//开带下划线用丰代替
  3406. }
  3407. if( EngineeringModeValue.silenceState == 0 )//静音//修改于2019.02.13“1-0”
  3408. {
  3409. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");
  3410. }
  3411. else
  3412. {
  3413. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");
  3414. }
  3415. break;
  3416. case SilenceState:
  3417. if( EngineeringModeValue.deviceAlarm == 1 )//机械报警
  3418. {
  3419. Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"关");//关带下划线用羊代替
  3420. }
  3421. else
  3422. {
  3423. Gui_DrawFont_GBK12( 58,7,BLACK,GRAY0,"开");//开带下划线用丰代替
  3424. }
  3425. if( EngineeringModeValue.silenceState == 0 )//静音//修改于2019.02.13“1-0”
  3426. {
  3427. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"羊");
  3428. }
  3429. else
  3430. {
  3431. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"丰");
  3432. }
  3433. if( EngineeringModeValue.bubbleAlarm == 1 )//气泡或无液
  3434. {
  3435. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"关");
  3436. }
  3437. else
  3438. {
  3439. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"开");
  3440. }
  3441. break;
  3442. case BubbleAlarm:
  3443. if( EngineeringModeValue.silenceState == 0 )//静音//修改于2019.02.13“1-0”
  3444. {
  3445. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"关");
  3446. }
  3447. else
  3448. {
  3449. Gui_DrawFont_GBK12( 112,7,BLACK,GRAY0,"开");
  3450. }
  3451. if( EngineeringModeValue.bubbleAlarm == 1 )//气泡或无液
  3452. {
  3453. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"羊");
  3454. }
  3455. else
  3456. {
  3457. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"丰");
  3458. }
  3459. if( EngineeringModeValue.closedState == 1 )//扣合
  3460. {
  3461. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关");
  3462. }
  3463. else
  3464. {
  3465. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开");
  3466. }
  3467. break;
  3468. case ClosedState:
  3469. if( EngineeringModeValue.bubbleAlarm == 1 )//气泡或无液
  3470. {
  3471. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"关");
  3472. }
  3473. else
  3474. {
  3475. Gui_DrawFont_GBK12( 58,5,BLACK,GRAY0,"开");
  3476. }
  3477. if( EngineeringModeValue.closedState == 1 )//扣合
  3478. {
  3479. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"羊");
  3480. }
  3481. else
  3482. {
  3483. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"丰");
  3484. }
  3485. if( EngineeringModeValue.automatic == 1 )//自动调整
  3486. {
  3487. //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17
  3488. Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " );
  3489. DecimalToASCII( 150,tempBuf,3 );
  3490. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf );
  3491. }
  3492. else
  3493. {
  3494. //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17
  3495. Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " );
  3496. DecimalToASCII( 1,tempBuf,3 );
  3497. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf );
  3498. }
  3499. break;
  3500. case Automatic:
  3501. if( EngineeringModeValue.closedState == 1 )//扣合
  3502. {
  3503. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"关");
  3504. }
  3505. else
  3506. {
  3507. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"开");
  3508. }
  3509. if( EngineeringModeValue.automatic == 1 )//自动调整
  3510. {
  3511. //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17
  3512. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量
  3513. Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0,"___" );
  3514. DecimalToASCII( 150,tempBuf,3 );
  3515. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf );
  3516. /*if(TotalDoesChange1 == 1)
  3517. {
  3518. InputTotalDoseBuff[0]=0;
  3519. InputTotalDoseBuff[1]=0;
  3520. InputTotalDoseBuff[2]=0;
  3521. InputTotalDoseBuff[3]=0;
  3522. //Write_Multi31256RAM(HISTORY31256_DATA_InputTotalDose,InputTotalDoseBuff,4);
  3523. FlashWriteOperate( InputTotalDoseBuff,4,HISTORY31256_DATA_InputTotalDose );
  3524. }*/
  3525. }
  3526. else
  3527. {
  3528. //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.4");//2017.03.17
  3529. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"总输注量");//2017年03月17日,修改为输入总量
  3530. Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0,"___" );//病区
  3531. DecimalToASCII( 1,tempBuf,3 );
  3532. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf );
  3533. /*if(TotalDoesChange0 == 1)
  3534. {
  3535. InputTotalDoseBuff[0]=(uint8_t)(149000>>24);
  3536. InputTotalDoseBuff[1]=(uint8_t)(149000>>16);
  3537. InputTotalDoseBuff[2]=(uint8_t)(149000>>8);
  3538. InputTotalDoseBuff[3]=(uint8_t)149000;
  3539. //Write_Multi31256RAM(HISTORY31256_DATA_InputTotalDose,InputTotalDoseBuff,4);
  3540. FlashWriteOperate( InputTotalDoseBuff,4,HISTORY31256_DATA_InputTotalDose );
  3541. }*/
  3542. }
  3543. if( EngineeringModeValue.jamAlarm == 1 )//堵塞
  3544. {
  3545. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关");
  3546. }
  3547. else
  3548. {
  3549. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开");
  3550. }
  3551. break;
  3552. case JamAlarm:
  3553. if( EngineeringModeValue.automatic == 1 )//自动调整
  3554. {
  3555. //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17
  3556. Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " );
  3557. DecimalToASCII( 150,tempBuf,3 );
  3558. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf );
  3559. }
  3560. else
  3561. {
  3562. //Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"1.5");//2017.03.17
  3563. Gui_DrawFont_GBK8Number( 58,2,BLACK,GRAY0," " );
  3564. DecimalToASCII( 001,tempBuf,3 );
  3565. Gui_DrawFont_GBK8Number( 58,3,BLACK,GRAY0,tempBuf );
  3566. }
  3567. if( EngineeringModeValue.jamAlarm == 1 )//堵塞
  3568. {
  3569. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"羊");
  3570. }
  3571. else
  3572. {
  3573. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"丰");
  3574. }
  3575. if( EngineeringModeValue.pressure_switch == 1 )//压力显示
  3576. {
  3577. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"关");
  3578. }
  3579. else
  3580. {
  3581. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"开");
  3582. }
  3583. break;
  3584. //---------------增加压力显示开关-------------------
  3585. case pressure_button:
  3586. if( EngineeringModeValue.jamAlarm == 1 )//堵塞
  3587. {
  3588. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"关");
  3589. }
  3590. else
  3591. {
  3592. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"开");
  3593. }
  3594. if( EngineeringModeValue.pressure_switch == 1 )//压力显示
  3595. {
  3596. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"羊");
  3597. }
  3598. else
  3599. {
  3600. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"丰");
  3601. }
  3602. if(EngineeringModeValue.test == 1)//测试开关
  3603. {
  3604. Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"关");
  3605. }
  3606. else
  3607. {
  3608. Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"开");
  3609. }
  3610. break;
  3611. case test:
  3612. if( EngineeringModeValue.pressure_switch == 1 )//压力显示
  3613. {
  3614. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"关");
  3615. }
  3616. else
  3617. {
  3618. Gui_DrawFont_GBK12( 58,1,BLACK,GRAY0,"开");
  3619. }
  3620. if(EngineeringModeValue.test == 1)//测试开关
  3621. {
  3622. Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"羊");
  3623. }
  3624. else
  3625. {
  3626. Gui_DrawFont_GBK12( 112,1,BLACK,GRAY0,"丰");
  3627. }
  3628. default:break;
  3629. }
  3630. }
  3631. }
  3632. /*************************************************************************************
  3633. * Function: DrawTest1Picture
  3634. * Object: 绘制测试画面
  3635. * 输入: 无
  3636. * 输出: 无
  3637. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3638. **************************************************************************************/
  3639. void DrawTest1Picture( void )
  3640. {
  3641. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3642. if( emPictureRunState == FirstEnter )
  3643. {
  3644. LCDClear( GRAY0 );
  3645. DrawBatteryDisplay();//电池
  3646. DrawSignalDisplay();//信号
  3647. DecimalToASCII( displayTimeBuf.year,tempBuf,4 );
  3648. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,tempBuf );
  3649. Gui_DrawFont_GBK12( 28,7,BLACK,GRAY0,"/" );
  3650. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );
  3651. Gui_DrawFont_GBK12( 34,7,BLACK,GRAY0,tempBuf );
  3652. Gui_DrawFont_GBK12( 46,7,BLACK,GRAY0,"/" );
  3653. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );
  3654. Gui_DrawFont_GBK12( 52,7,BLACK,GRAY0,tempBuf );
  3655. Gui_DrawFont_GBK12( 64,7,BLACK,GRAY0," " );
  3656. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );
  3657. Gui_DrawFont_GBK12( 70,7,BLACK,GRAY0,tempBuf );
  3658. Gui_DrawFont_GBK12( 82,7,BLACK,GRAY0,":" );
  3659. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );
  3660. Gui_DrawFont_GBK12( 88,7,BLACK,GRAY0,tempBuf );
  3661. Gui_DrawFont_GBK12( 100,7,BLACK,GRAY0," " );
  3662. DecimalToASCII( displayTimeBuf.seconds,tempBuf,2 );
  3663. Gui_DrawFont_GBK12( 106,7,BLACK,GRAY0,tempBuf );
  3664. Gui_DrawFont_GBK8Number( 4,5,BLACK,GRAY0,"Volt:");
  3665. DecimalToASCII( batteryAverage,tempBuf,4 );
  3666. Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf );
  3667. Gui_DrawFont_GBK8Number( 58,5,BLACK,GRAY0,"-" );
  3668. DecimalToASCII( realTimeData.batteryVolt,tempBuf,3 );
  3669. Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf );
  3670. Gui_DrawFont_GBK8Number( 4,4,BLACK,GRAY0,"Pressure1:");//压力值
  3671. DecimalToASCII( realTimeData.pressureF,tempBuf,4 );
  3672. Gui_DrawFont_GBK8Number( 64,4,BLACK,GRAY0,tempBuf );
  3673. // Gui_DrawFont_GBK8Number( 88,4,BLACK,GRAY0,"-" );
  3674. // DecimalToASCII( realTimeData.pressure,tempBuf,3 );
  3675. // Gui_DrawFont_GBK8Number( 94,4,BLACK,GRAY0,tempBuf );
  3676. //
  3677. // Gui_DrawFont_GBK8Number( 4,3,BLACK,GRAY0,"Pressure2:");//压强值
  3678. // DecimalToASCII( realTimeData.pressureF2,tempBuf,4 );
  3679. // Gui_DrawFont_GBK8Number( 64,3,BLACK,GRAY0,tempBuf );
  3680. // Gui_DrawFont_GBK8Number( 88,3,BLACK,GRAY0,"-" );
  3681. // DecimalToASCII( realTimeData.pressure2,tempBuf,3 );
  3682. // Gui_DrawFont_GBK8Number( 94,3,BLACK,GRAY0,tempBuf );
  3683. // Gui_DrawFont_GBK8Number( 4,5,BLACK,GRAY0,"Volt:");
  3684. // DecimalToASCII( ADC_ConvertedValue[0],tempBuf,4 );
  3685. // Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf );
  3686. // Gui_DrawFont_GBK8Number( 58,5,BLACK,GRAY0,"-" );
  3687. // DecimalToASCII( batteryAverage,tempBuf,3 );
  3688. // Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf );
  3689. if( ( TaskSchedulerFlag.zigbeeComReadFlag != TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.zigbeeXmitFlag != TASK_FLAG_CLEAR ) )
  3690. {
  3691. Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee open " );
  3692. }
  3693. else
  3694. {
  3695. Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee close" );
  3696. }
  3697. emPictureRunState = Update;
  3698. }
  3699. else
  3700. {
  3701. DrawBatteryDisplay();//电池
  3702. DrawSignalDisplay();//信号
  3703. DecimalToASCII( displayTimeBuf.year,tempBuf,4 );//年
  3704. Gui_DrawFont_GBK12( 4,7,BLACK,GRAY0,tempBuf );
  3705. DecimalToASCII( displayTimeBuf.month,tempBuf,2 );//月
  3706. Gui_DrawFont_GBK12( 34,7,BLACK,GRAY0,tempBuf );
  3707. DecimalToASCII( displayTimeBuf.date,tempBuf,2 );//日
  3708. Gui_DrawFont_GBK12( 52,7,BLACK,GRAY0,tempBuf );
  3709. DecimalToASCII( displayTimeBuf.hour,tempBuf,2 );//时
  3710. Gui_DrawFont_GBK12( 70,7,BLACK,GRAY0,tempBuf );
  3711. DecimalToASCII( displayTimeBuf.minute,tempBuf,2 );//分
  3712. Gui_DrawFont_GBK12( 88,7,BLACK,GRAY0,tempBuf );
  3713. DecimalToASCII( displayTimeBuf.seconds,tempBuf,2 );//秒
  3714. Gui_DrawFont_GBK12( 106,7,BLACK,GRAY0,tempBuf );
  3715. DecimalToASCII( batteryAverage,tempBuf,4 );//电池信息
  3716. Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf );
  3717. DecimalToASCII( realTimeData.batteryVolt,tempBuf,3 );
  3718. Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf );
  3719. if( TaskSchedulerFlag.testDispFlag == TASK_FLAG_CLEAR )
  3720. {
  3721. DecimalToASCII( 0,tempBuf,4 );//压力值
  3722. Gui_DrawFont_GBK8Number( 64,4,BLACK,GRAY0,tempBuf );
  3723. }
  3724. else
  3725. {
  3726. DecimalToASCII( realTimeData.pressureF,tempBuf,4 );//压力值
  3727. Gui_DrawFont_GBK8Number( 64,4,BLACK,GRAY0,tempBuf );
  3728. if( testDispCounts >= 3 )//显示出值后就清零,有采集值更新时方便看
  3729. {
  3730. testDispCounts = 0;
  3731. TaskSchedulerFlag.testDispFlag = TASK_FLAG_CLEAR;
  3732. }
  3733. }
  3734. // DecimalToASCII( realTimeData.pressure,tempBuf,3 );
  3735. // Gui_DrawFont_GBK8Number( 94,4,BLACK,GRAY0,tempBuf );
  3736. //
  3737. // DecimalToASCII( realTimeData.pressureF2,tempBuf,4 );//压强值
  3738. // Gui_DrawFont_GBK8Number( 64,3,BLACK,GRAY0,tempBuf );
  3739. // DecimalToASCII( realTimeData.pressure2,tempBuf,3 );
  3740. // Gui_DrawFont_GBK8Number( 94,3,BLACK,GRAY0,tempBuf );
  3741. // DecimalToASCII( ADC_ConvertedValue[0],tempBuf,4 );//电池信息
  3742. // Gui_DrawFont_GBK8Number( 34,5,BLACK,GRAY0,tempBuf );
  3743. // DecimalToASCII( batteryAverage,tempBuf,3 );
  3744. // Gui_DrawFont_GBK8Number( 64,5,BLACK,GRAY0,tempBuf );
  3745. if( ( TaskSchedulerFlag.zigbeeComReadFlag != TASK_FLAG_CLEAR ) || ( TaskSchedulerFlag.zigbeeXmitFlag != TASK_FLAG_CLEAR ) )
  3746. {
  3747. Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee open " );
  3748. }
  3749. else
  3750. {
  3751. Gui_DrawFont_GBK8Number( 4,2,BLACK,GRAY0,"zigbee close" );
  3752. }
  3753. }
  3754. }
  3755. /*************************************************************************************
  3756. * Function: DrawEvaluateTransfusePicture
  3757. * Object: 绘制输注评价画面
  3758. * 输入: 无
  3759. * 输出: 无
  3760. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3761. **************************************************************************************/
  3762. void DrawEvaluateTransfusePicture( void )
  3763. {
  3764. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3765. if( emPictureRunState == FirstEnter )
  3766. {
  3767. LCDClear( GRAY0 );
  3768. DrawBatteryDisplay();//电池
  3769. DrawSignalDisplay();//信号
  3770. DrawSilenceDisplay();//静音
  3771. Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"输注评价" );
  3772. if( emEvaluateTransfuseChoose == Pruritus )
  3773. {
  3774. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0,"__" );//瘙痒
  3775. }
  3776. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"瘙 痒" );
  3777. DecimalToASCII( evaluateTransfuseValue.pruritus,tempBuf,2 );
  3778. Gui_DrawFont_GBK8Number( 55,5,BLACK,GRAY0,tempBuf );
  3779. if( emEvaluateTransfuseChoose == RASS )
  3780. {
  3781. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0,"__" );//镇静评分
  3782. }
  3783. Gui_DrawFont_GBK12( 68,5,BLACK,GRAY0,"镇静评分" );
  3784. DecimalToASCII( evaluateTransfuseValue.RASS,tempBuf,2 );
  3785. Gui_DrawFont_GBK8Number( 118,5,BLACK,GRAY0,tempBuf );
  3786. if( emEvaluateTransfuseChoose == PONV )
  3787. {
  3788. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0,"__" );//恶心呕吐
  3789. }
  3790. Gui_DrawFont_GBK12( 4,3,BLACK,GRAY0,"恶心呕吐" );
  3791. DecimalToASCII( evaluateTransfuseValue.PONV,tempBuf,2 );
  3792. Gui_DrawFont_GBK8Number( 55,3,BLACK,GRAY0,tempBuf );
  3793. Gui_DrawFont_GBK12( 68,3,BLACK,GRAY0,"四肢肌力" );
  3794. if( emEvaluateTransfuseChoose == LimbMyodynamia )
  3795. {
  3796. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0,"<==" );//四肢肌力
  3797. }
  3798. Gui_DrawFont_GBK12( 4,1,BLACK,GRAY0,"疼痛评价" );
  3799. if( emEvaluateTransfuseChoose == PainEvaluate )
  3800. {
  3801. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0,"<==" );//疼痛评价
  3802. }
  3803. Gui_DrawFont_GBK12( 68,1,BLACK,GRAY0,"确认评价" );
  3804. if( emEvaluateTransfuseChoose == VerifyEvaluate )
  3805. {
  3806. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0,"<==" );//确认评价
  3807. }
  3808. emPictureRunState = Update;
  3809. }
  3810. else
  3811. {
  3812. DrawBatteryDisplay();//电池
  3813. DrawSignalDisplay();//信号
  3814. DrawSilenceDisplay();//静音
  3815. switch(emEvaluateTransfuseChoose)
  3816. {
  3817. case Pruritus:
  3818. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0,"__" );//瘙痒
  3819. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分
  3820. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐
  3821. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力
  3822. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价
  3823. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价
  3824. DecimalToASCII( evaluateTransfuseValue.pruritus,tempBuf,2 );
  3825. Gui_DrawFont_GBK8Number( 55,5,BLACK,GRAY0,tempBuf );
  3826. break;
  3827. case RASS:
  3828. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒
  3829. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0,"__" );//镇静评分
  3830. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐
  3831. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力
  3832. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价
  3833. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价
  3834. DecimalToASCII( evaluateTransfuseValue.RASS,tempBuf,2 );
  3835. Gui_DrawFont_GBK8Number( 118,5,BLACK,GRAY0,tempBuf );
  3836. break;
  3837. case PONV:
  3838. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒
  3839. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分
  3840. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0,"__" );//恶心呕吐
  3841. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力
  3842. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价
  3843. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价
  3844. DecimalToASCII( evaluateTransfuseValue.PONV,tempBuf,2 );
  3845. Gui_DrawFont_GBK8Number( 55,3,BLACK,GRAY0,tempBuf );
  3846. break;
  3847. case LimbMyodynamia:
  3848. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒
  3849. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分
  3850. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐
  3851. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0,"<==" );//四肢肌力
  3852. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价
  3853. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价
  3854. break;
  3855. case PainEvaluate:
  3856. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒
  3857. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分
  3858. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐
  3859. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力
  3860. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0,"<==" );//疼痛评价
  3861. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0," " );//确认评价
  3862. break;
  3863. case VerifyEvaluate:
  3864. Gui_DrawFont_GBK8Number( 55,4,BLACK,GRAY0," " );//瘙痒
  3865. Gui_DrawFont_GBK8Number( 118,4,BLACK,GRAY0," " );//镇静评分
  3866. Gui_DrawFont_GBK8Number( 55,2,BLACK,GRAY0," " );//恶心呕吐
  3867. Gui_DrawFont_GBK8( 118,3,BLACK,GRAY0," " );//四肢肌力
  3868. Gui_DrawFont_GBK8( 53,1,BLACK,GRAY0," " );//疼痛评价
  3869. Gui_DrawFont_GBK8( 118,1,BLACK,GRAY0,"<==" );//确认评价
  3870. break;
  3871. default:break;
  3872. }
  3873. }
  3874. }
  3875. /*************************************************************************************
  3876. * Function: DrawEvaluatePainPicture
  3877. * Object: 绘制疼痛评价画面
  3878. * 输入: 无
  3879. * 输出: 无
  3880. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3881. **************************************************************************************/
  3882. void DrawEvaluatePainPicture( void )
  3883. {
  3884. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3885. if( emPictureRunState == FirstEnter )
  3886. {
  3887. LCDClear( GRAY0 );
  3888. DrawBatteryDisplay();//电池
  3889. DrawSignalDisplay();//信号
  3890. DrawSilenceDisplay();//静音
  3891. Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"输注评价" );
  3892. Gui_DrawFont_GBK12( 4,4,BLACK,GRAY0,"静止" );
  3893. DecimalToASCII( evaluateTransfuseValue.Static,tempBuf,2 );
  3894. Gui_DrawFont_GBK8Number( 34,4,BLACK,GRAY0,tempBuf );
  3895. Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0,"__" );
  3896. Gui_DrawFont_GBK12( 68,4,BLACK,GRAY0,"活动" );
  3897. DecimalToASCII( evaluateTransfuseValue.Activity,tempBuf,2 );
  3898. Gui_DrawFont_GBK8Number( 98,4,BLACK,GRAY0,tempBuf );
  3899. Gui_DrawFont_GBK12( 4,2,BLACK,GRAY0,"满意度" );
  3900. DecimalToASCII( evaluateTransfuseValue.CACSI,tempBuf,2 );
  3901. Gui_DrawFont_GBK8Number( 64,2,BLACK,GRAY0,tempBuf );
  3902. emPictureRunState = Update;
  3903. }
  3904. else
  3905. {
  3906. DrawBatteryDisplay();//电池
  3907. DrawSignalDisplay();//信号
  3908. DrawSilenceDisplay();//静音
  3909. switch(emEvaluateTransfuseChoose)
  3910. {
  3911. case Static:
  3912. DecimalToASCII( evaluateTransfuseValue.Static,tempBuf,2 );
  3913. Gui_DrawFont_GBK8Number( 34,4,BLACK,GRAY0,tempBuf );
  3914. Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0,"__" );
  3915. Gui_DrawFont_GBK8Number( 98,3,BLACK,GRAY0," " );
  3916. Gui_DrawFont_GBK8Number( 64,1,BLACK,GRAY0," " );
  3917. if( evaluateTransfuseValue.Static == 1 )
  3918. {
  3919. Gui_DrawFont_GBK12( 49,4,BLACK,GRAY0,"轻" );
  3920. }
  3921. else if( evaluateTransfuseValue.Static == 2 )
  3922. {
  3923. Gui_DrawFont_GBK12( 49,4,BLACK,GRAY0,"中" );
  3924. }
  3925. else if( evaluateTransfuseValue.Static == 3 )
  3926. {
  3927. Gui_DrawFont_GBK12( 49,4,BLACK,GRAY0,"重" );
  3928. }
  3929. break;
  3930. case Activity:
  3931. DecimalToASCII( evaluateTransfuseValue.Activity,tempBuf,2 );
  3932. Gui_DrawFont_GBK8Number( 98,4,BLACK,GRAY0,tempBuf );
  3933. Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0," " );
  3934. Gui_DrawFont_GBK8Number( 98,3,BLACK,GRAY0,"__" );
  3935. Gui_DrawFont_GBK8Number( 64,1,BLACK,GRAY0," " );
  3936. if( evaluateTransfuseValue.Activity == 1 )
  3937. {
  3938. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"轻" );
  3939. }
  3940. else if( evaluateTransfuseValue.Activity == 2 )
  3941. {
  3942. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"中" );
  3943. }
  3944. else if( evaluateTransfuseValue.Activity == 3 )
  3945. {
  3946. Gui_DrawFont_GBK12( 113,4,BLACK,GRAY0,"重" );
  3947. }
  3948. break;
  3949. case CACSI:
  3950. DecimalToASCII( evaluateTransfuseValue.CACSI,tempBuf,2 );
  3951. Gui_DrawFont_GBK8Number( 64,2,BLACK,GRAY0,tempBuf );
  3952. Gui_DrawFont_GBK8Number( 34,3,BLACK,GRAY0," " );
  3953. Gui_DrawFont_GBK8Number( 98,3,BLACK,GRAY0," " );
  3954. Gui_DrawFont_GBK8Number( 64,1,BLACK,GRAY0,"__" );
  3955. if( evaluateTransfuseValue.CACSI == 1 )
  3956. {
  3957. Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0," " );
  3958. Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0,"不满意" );
  3959. }
  3960. else if( evaluateTransfuseValue.CACSI == 2 )
  3961. {
  3962. Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0," " );
  3963. Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0,"一 般" );
  3964. }
  3965. else if( evaluateTransfuseValue.CACSI == 3 )
  3966. {
  3967. Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0," " );
  3968. Gui_DrawFont_GBK12( 89,2,BLACK,GRAY0,"满 意" );
  3969. }
  3970. break;
  3971. default:break;
  3972. }
  3973. }
  3974. }
  3975. /*************************************************************************************
  3976. * Function: DrawLimbMyodynamiaPicture
  3977. * Object: 绘制四肢肌力画面
  3978. * 输入: 无
  3979. * 输出: 无
  3980. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  3981. **************************************************************************************/
  3982. void DrawLimbMyodynamiaPicture( void )
  3983. {
  3984. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  3985. if( emPictureRunState == FirstEnter )
  3986. {
  3987. LCDClear( GRAY0 );
  3988. DrawBatteryDisplay();//电池
  3989. DrawSignalDisplay();//信号
  3990. DrawSilenceDisplay();//静音
  3991. Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"四肢肌力" );
  3992. Gui_DrawFont_GBK12( 4,5,BLACK,GRAY0,"左上肢" );
  3993. DecimalToASCII( evaluateTransfuseValue.LeftArm,tempBuf,2 );
  3994. Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0,"__" );
  3995. Gui_DrawFont_GBK8Number( 46,5,BLACK,GRAY0,tempBuf );
  3996. Gui_DrawFont_GBK12( 68,5,BLACK,GRAY0,"左下肢" );
  3997. DecimalToASCII( evaluateTransfuseValue.LeftLeg,tempBuf,2 );
  3998. Gui_DrawFont_GBK8Number( 110,5,BLACK,GRAY0,tempBuf );
  3999. Gui_DrawFont_GBK12( 4,2,BLACK,GRAY0,"右上肢" );
  4000. DecimalToASCII( evaluateTransfuseValue.RightArm,tempBuf,2 );
  4001. Gui_DrawFont_GBK8Number( 46,2,BLACK,GRAY0,tempBuf );
  4002. Gui_DrawFont_GBK12( 68,2,BLACK,GRAY0,"右下肢" );
  4003. DecimalToASCII( evaluateTransfuseValue.RightLeg,tempBuf,2 );
  4004. Gui_DrawFont_GBK8Number( 110,2,BLACK,GRAY0,tempBuf );
  4005. emPictureRunState = Update;
  4006. }
  4007. else
  4008. {
  4009. DrawBatteryDisplay();//电池
  4010. DrawSignalDisplay();//信号
  4011. DrawSilenceDisplay();//静音
  4012. switch(emEvaluateTransfuseChoose)
  4013. {
  4014. case LeftArm:
  4015. DecimalToASCII( evaluateTransfuseValue.LeftArm,tempBuf,2 );
  4016. Gui_DrawFont_GBK8Number( 46,5,BLACK,GRAY0,tempBuf );
  4017. Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0,"__" );//LeftArm
  4018. Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0," " );//LeftLeg
  4019. Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0," " );//RightArm
  4020. Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0," " );//RightLeg
  4021. break;
  4022. case LeftLeg:
  4023. DecimalToASCII( evaluateTransfuseValue.LeftLeg,tempBuf,2 );
  4024. Gui_DrawFont_GBK8Number( 110,5,BLACK,GRAY0,tempBuf );
  4025. Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0," " );//LeftArm
  4026. Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0,"__" );//LeftLeg
  4027. Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0," " );//RightArm
  4028. Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0," " );//RightLeg
  4029. break;
  4030. case RightArm:
  4031. DecimalToASCII( evaluateTransfuseValue.RightArm,tempBuf,2 );
  4032. Gui_DrawFont_GBK8Number( 46,2,BLACK,GRAY0,tempBuf );
  4033. Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0," " );//LeftArm
  4034. Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0," " );//LeftLeg
  4035. Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0,"__" );//RightArm
  4036. Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0," " );//RightLeg
  4037. break;
  4038. case RightLeg:
  4039. DecimalToASCII( evaluateTransfuseValue.RightLeg,tempBuf,2 );
  4040. Gui_DrawFont_GBK8Number( 110,2,BLACK,GRAY0,tempBuf );
  4041. Gui_DrawFont_GBK8Number( 46,4,BLACK,GRAY0," " );//LeftArm
  4042. Gui_DrawFont_GBK8Number( 110,4,BLACK,GRAY0," " );//LeftLeg
  4043. Gui_DrawFont_GBK8Number( 46,1,BLACK,GRAY0," " );//RightArm
  4044. Gui_DrawFont_GBK8Number( 110,1,BLACK,GRAY0,"__" );//RightLeg
  4045. break;
  4046. default:break;
  4047. }
  4048. }
  4049. }
  4050. /*************************************************************************************
  4051. * Function: DrawEvaluateUploadEnterPicture
  4052. * Object: 绘制进入评价上传画面
  4053. * 输入: 无
  4054. * 输出: 无
  4055. * 备注: uint8_t tempBuf[10];通过DecimalToASCII()函数将所需显示的变量转换成数组进行写操作
  4056. **************************************************************************************/
  4057. void DrawEvaluateUploadEnterPicture( void )
  4058. {
  4059. uint8_t tempBuf[10] = { 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30 };
  4060. if( emPictureRunState == FirstEnter )
  4061. {
  4062. LCDClear( GRAY0 );
  4063. DrawBatteryDisplay();//电池
  4064. DrawSignalDisplay();//信号
  4065. DrawSilenceDisplay();//静音
  4066. Gui_DrawFont_GBK12( 41,7,BLACK,GRAY0,"驼人科技" );
  4067. Gui_DrawFont_GBK12( 10,5,BLACK,GRAY0,"评价人" );
  4068. DecimalToASCII( evaluateTransfuseValue.Valuer,tempBuf,2 );
  4069. Gui_DrawFont_GBK12( 52,5,BLACK,GRAY0,tempBuf );
  4070. if( emEvaluateTransfuseChoose == Valuer )
  4071. {
  4072. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"<==" );
  4073. }
  4074. Gui_DrawFont_GBK12( 10,3,BLACK,GRAY0,"上传确认评价" );
  4075. if( emEvaluateTransfuseChoose == VerifyUpload )
  4076. {
  4077. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"<==" );
  4078. }
  4079. if( emEvaluateTransfuseChoose == Uploading )
  4080. {
  4081. Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"正在上传" );
  4082. }
  4083. else if( emEvaluateTransfuseChoose == UploadFinshed )
  4084. {
  4085. Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"上传成功" );
  4086. }
  4087. emPictureRunState = Update;
  4088. }
  4089. else
  4090. {
  4091. DrawBatteryDisplay();//电池
  4092. DrawSignalDisplay();//信号
  4093. DrawSilenceDisplay();//静音
  4094. switch(emEvaluateTransfuseChoose)
  4095. {
  4096. case Valuer:
  4097. DecimalToASCII( evaluateTransfuseValue.Valuer,tempBuf,2 );
  4098. Gui_DrawFont_GBK12( 52,5,BLACK,GRAY0,tempBuf );
  4099. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0,"<==" );
  4100. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0," " );
  4101. // Gui_DrawFont_GBK24( 110,130,BLACK,GRAY0,"__" );
  4102. // Gui_DrawFont_GBK24( 170,165,BLACK,GRAY0," " );
  4103. break;
  4104. case VerifyUpload:
  4105. Gui_DrawFont_GBK12( 112,5,BLACK,GRAY0," " );
  4106. Gui_DrawFont_GBK12( 112,3,BLACK,GRAY0,"<==" );
  4107. // Gui_DrawFont_GBK24( 110,130,BLACK,GRAY0," " );
  4108. // Gui_DrawFont_GBK24( 170,165,BLACK,GRAY0,"<==" );
  4109. // Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0," " );
  4110. break;
  4111. case Uploading:
  4112. Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"正在上传" );
  4113. break;
  4114. case UploadFinshed:
  4115. Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0," " );
  4116. Gui_DrawFont_GBK12( 10,1,BLACK,GRAY0,"上传成功" );
  4117. break;
  4118. case UploadFall:
  4119. Gui_DrawFont_GBK24( 110,130,BLACK,GRAY0," " );
  4120. Gui_DrawFont_GBK24( 170,165,BLACK,GRAY0,"<==" );
  4121. Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"上传失败 请重新上传" );
  4122. break;
  4123. default:break;
  4124. }
  4125. }
  4126. }
  4127. /*************************************************************************************
  4128. * Function: DrawEvaluateUploadingPicture
  4129. * Object: 绘制正在上传评价画面
  4130. * 输入: 无
  4131. * 输出: 无
  4132. * 备注:
  4133. **************************************************************************************/
  4134. void DrawEvaluateUploadingPicture( void )
  4135. {
  4136. LCDClear( GRAY0 );
  4137. DrawBatteryDisplay();//电池
  4138. DrawSignalDisplay();//信号
  4139. DrawSilenceDisplay();//静音
  4140. Gui_DrawLine(0,60,320,60,BLACK);
  4141. Gui_DrawFont_GBK24( 95,70,BLACK,GRAY0,"驼 人 科 技" );
  4142. Gui_DrawFont_GBK24( 10,110,BLACK,GRAY0,"评价人" );
  4143. Gui_DrawFont_GBK24( 110,115,BLACK,GRAY0,"0 0" );
  4144. Gui_DrawFont_GBK24( 10,160,BLACK,GRAY0,"上传确认评价" );
  4145. Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"正在上传" );
  4146. }
  4147. /*************************************************************************************
  4148. * Function: DrawEvaluateUploadingSuccessPicture
  4149. * Object: 绘制上传评价成功画面
  4150. * 输入: 无
  4151. * 输出: 无
  4152. * 备注:
  4153. **************************************************************************************/
  4154. void DrawEvaluateUploadingSuccessPicture( void )
  4155. {
  4156. LCDClear( GRAY0 );
  4157. Gui_DrawLine(0,60,320,60,BLACK);
  4158. Gui_DrawFont_GBK24( 95,70,BLACK,GRAY0,"驼 人 科 技" );
  4159. Gui_DrawFont_GBK24( 10,110,BLACK,GRAY0,"评价人" );
  4160. Gui_DrawFont_GBK24( 110,115,BLACK,GRAY0,"0 0" );
  4161. Gui_DrawFont_GBK24( 10,160,BLACK,GRAY0,"上传确认评价" );
  4162. Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"上传成功" );
  4163. }
  4164. /*************************************************************************************
  4165. * Function: DrawEvaluateUploadingFailPicture
  4166. * Object: 绘制上传评价失败画面
  4167. * 输入: 无
  4168. * 输出: 无
  4169. * 备注:
  4170. **************************************************************************************/
  4171. void DrawEvaluateUploadingFailPicture( void )
  4172. {
  4173. LCDClear( GRAY0 );
  4174. Gui_DrawLine(0,60,320,60,BLACK);
  4175. Gui_DrawFont_GBK24( 95,70,BLACK,GRAY0,"驼 人 科 技" );
  4176. Gui_DrawFont_GBK24( 10,110,BLACK,GRAY0,"评价人" );
  4177. Gui_DrawFont_GBK24( 110,115,BLACK,GRAY0,"0 0" );
  4178. Gui_DrawFont_GBK24( 10,160,BLACK,GRAY0,"上传确认评价" );
  4179. Gui_DrawFont_GBK24( 10,210,BLACK,GRAY0,"上传失败 请重新上传" );
  4180. }
  4181. /*************************************************************************************
  4182. * Function: LCDPictureDisplay
  4183. * Object: 调用所有绘制界面函数
  4184. * 输入: 无
  4185. * 输出: 无
  4186. * 备注: 此函数用来调用当前应该显示的界面
  4187. * 重要变量:
  4188. * emDisplayPicture用来调用应显示的界面
  4189. * emCurrentPicture此变量用来防止界面反复刷新
  4190. **************************************************************************************/
  4191. void LCDPictureDisplay( void )
  4192. {
  4193. switch(emDisplayPicture)
  4194. {
  4195. //启动界面
  4196. case Startup:
  4197. emDisplayPicture = WaitDisp;
  4198. emCurrentPicture = Startup;
  4199. DrawStartupPicture();
  4200. break;
  4201. //设备ID
  4202. case DeviceID:
  4203. emDisplayPicture = DispCurrent;
  4204. emCurrentPicture = DeviceID;
  4205. DrawDeviceIDPicture();
  4206. break;
  4207. //时间显示
  4208. case TimeDisp:
  4209. emDisplayPicture = DispCurrent;
  4210. emCurrentPicture = TimeDisp;
  4211. DrawTimeDispPicture();
  4212. break;
  4213. //时间设置
  4214. case TimeSetDisp:
  4215. emDisplayPicture = DispCurrent;
  4216. emCurrentPicture = TimeSetDisp;
  4217. DrawTimeSetPicture();
  4218. break;
  4219. //密码设置
  4220. case PasswordSetDisp:
  4221. emDisplayPicture = DispCurrent;
  4222. emCurrentPicture = PasswordSetDisp;
  4223. DrawPasswordSetPicture();
  4224. break;
  4225. //确认住院信息
  4226. case VerifyInfoDisp:
  4227. emDisplayPicture = DispCurrent;
  4228. emCurrentPicture = VerifyInfoDisp;
  4229. DrawVerifyInfoPicture();
  4230. break;
  4231. //设置确认住院信息
  4232. case SetVerifyInfoDisp:
  4233. emDisplayPicture = DispCurrent;
  4234. emCurrentPicture = SetVerifyInfoDisp;
  4235. DrawSetVerifyInfoPicture();
  4236. break;
  4237. //排气
  4238. case AiroutDisp:
  4239. emDisplayPicture = DispCurrent;
  4240. emCurrentPicture = AiroutDisp;
  4241. DrawAiroutPicture();
  4242. break;
  4243. //设置
  4244. case SetParamDisp:
  4245. emDisplayPicture = DispCurrent;
  4246. emCurrentPicture = SetParamDisp;
  4247. DrawSetParameterPicture();
  4248. break;
  4249. //历史数据首页
  4250. case HistoryFisrtDisp:
  4251. emDisplayPicture = DispCurrent;
  4252. emCurrentPicture = HistoryFisrtDisp;
  4253. DrawHistoryFirstPicture();
  4254. break;
  4255. //历史数据第二页
  4256. case HistorySecondDisp:
  4257. emDisplayPicture = DispCurrent;
  4258. emCurrentPicture = HistorySecondDisp;
  4259. DrawHistorySecondPicture();
  4260. break;
  4261. //运行首次量
  4262. case RunFirstDoseDisp:
  4263. emDisplayPicture = DispCurrent;
  4264. emCurrentPicture = RunFirstDoseDisp;
  4265. DrawRunFirstDosePicture();
  4266. break;
  4267. //运行界面
  4268. case RunMainDisp:
  4269. emDisplayPicture = DispCurrent;
  4270. emCurrentPicture = RunMainDisp;
  4271. DrawRunMainPicture();
  4272. // DrawTest1Picture();
  4273. break;
  4274. //压力界面
  4275. case RunPressureDisp:
  4276. emDisplayPicture = DispCurrent;
  4277. emCurrentPicture = RunPressureDisp;
  4278. DrawRunPressurePicture();
  4279. break;
  4280. //运行PCA显示
  4281. case RunPCADisp:
  4282. emDisplayPicture = DispCurrent;
  4283. emCurrentPicture = RunPCADisp;
  4284. DrawPCAPicture();
  4285. break;
  4286. // 密码显示
  4287. case LockPasswordDisp:
  4288. emDisplayPicture = DispCurrent;
  4289. emCurrentPicture = LockPasswordDisp;
  4290. DrawLockPasswordPicture();
  4291. break;
  4292. //输液完毕
  4293. case TransfuseOverDisp:
  4294. emDisplayPicture = DispCurrent;
  4295. emCurrentPicture = TransfuseOverDisp;
  4296. DrawTransfuseOverPicture();
  4297. break;
  4298. //机械故障
  4299. case AlarmDeviceDisp:
  4300. emDisplayPicture = DispCurrent;
  4301. emCurrentPicture = AlarmDeviceDisp;
  4302. DrawAlarmDevicePicture();
  4303. break;
  4304. //堵塞故障
  4305. case AlarmJamDisp:
  4306. emDisplayPicture = DispCurrent;
  4307. emCurrentPicture = AlarmJamDisp;
  4308. DrawAlarmJamPicture();
  4309. break;
  4310. //极限量
  4311. case AlarmMaxDisp:
  4312. emDisplayPicture = DispCurrent;
  4313. emCurrentPicture = AlarmMaxDisp;
  4314. DrawAlarmMaxPicture();
  4315. break;
  4316. //气泡或无液
  4317. case AlarmBubbleDisp:
  4318. emDisplayPicture = DispCurrent;
  4319. emCurrentPicture = AlarmBubbleDisp;
  4320. DrawAlarmBubblePicture();
  4321. break;
  4322. //未装药盒
  4323. case AlarmNonePillCaseDisp:
  4324. emDisplayPicture = DispCurrent;
  4325. emCurrentPicture = AlarmNonePillCaseDisp;
  4326. DrawAlarmNonePillCasePicture();
  4327. break;
  4328. //电压低
  4329. case AlarmLowVoltDisp:
  4330. emDisplayPicture = DispCurrent;
  4331. emCurrentPicture = AlarmLowVoltDisp;
  4332. DrawAlarmLowVoltPicture();
  4333. break;
  4334. //管路脱落
  4335. case AlarmLineLostDisp:
  4336. emDisplayPicture = DispCurrent;
  4337. emCurrentPicture = AlarmLineLostDisp;
  4338. DrawAlarmLineLostPicture();
  4339. break;
  4340. //输注评价
  4341. case EvaluateTransfuseDisp:
  4342. emDisplayPicture = DispCurrent;
  4343. emCurrentPicture = EvaluateTransfuseDisp;
  4344. DrawEvaluateTransfusePicture();
  4345. break;
  4346. //疼痛评价
  4347. case EvaluatePainDisp:
  4348. emDisplayPicture = DispCurrent;
  4349. emCurrentPicture = EvaluatePainDisp;
  4350. DrawEvaluatePainPicture();
  4351. break;
  4352. //四肢肌力
  4353. case LimbMyodynamiaDisp:
  4354. emDisplayPicture = DispCurrent;
  4355. emCurrentPicture = LimbMyodynamiaDisp;
  4356. DrawLimbMyodynamiaPicture();
  4357. break;
  4358. //进入评价上传
  4359. case EvaluateUploadEnterDisp:
  4360. emDisplayPicture = DispCurrent;
  4361. emCurrentPicture = EvaluateUploadEnterDisp;
  4362. DrawEvaluateUploadEnterPicture();
  4363. break;
  4364. //正在上传评价
  4365. case EvaluateUploadingDisp:
  4366. emDisplayPicture = DispCurrent;
  4367. emCurrentPicture = EvaluateUploadingDisp;
  4368. DrawEvaluateUploadingPicture();
  4369. break;
  4370. //上传评价成功
  4371. case EvaluateUploadSuccessDisp:
  4372. emDisplayPicture = DispCurrent;
  4373. emCurrentPicture = EvaluateUploadSuccessDisp;
  4374. DrawEvaluateUploadingSuccessPicture();
  4375. break;
  4376. //上传评价失败
  4377. case EvaluateUploadFailDisp:
  4378. emDisplayPicture = DispCurrent;
  4379. emCurrentPicture = EvaluateUploadFailDisp;
  4380. DrawEvaluateUploadingFailPicture();
  4381. break;
  4382. //工程模式1
  4383. case EngineeringMode1Disp:
  4384. emDisplayPicture = DispCurrent;
  4385. emCurrentPicture = EngineeringMode1Disp;
  4386. DrawEngineeringMode1Picture();
  4387. break;
  4388. //工程模式2
  4389. case EngineeringMode2Disp:
  4390. emDisplayPicture = DispCurrent;
  4391. emCurrentPicture = EngineeringMode2Disp;
  4392. DrawEngineeringMode2Picture();
  4393. break;
  4394. //测试页显示
  4395. case Test1Disp:
  4396. emDisplayPicture = DispCurrent;
  4397. emCurrentPicture = Test1Disp;
  4398. DrawTest1Picture();
  4399. break;
  4400. //清屏
  4401. case ClearDisp:
  4402. LCDClear( GRAY0 );
  4403. break;
  4404. //输入总量报警显示 2017.03.17
  4405. case Input_total:
  4406. emDisplayPicture = DispCurrent;
  4407. emCurrentPicture = Input_total;
  4408. InputTotalPicture();
  4409. break;
  4410. case Inpatien:
  4411. emDisplayPicture = DispCurrent;
  4412. emCurrentPicture = Inpatien;
  4413. DrawNoInpatientPicture();
  4414. break;
  4415. default:break;
  4416. }
  4417. if( realTimeData.stateRun != Poweroff )//处理在关机过程中,预报警电池图标闪烁问题
  4418. {
  4419. if( sysAlarmFlag.VoltLowest == ALARM_PREPARE )
  4420. {
  4421. if( TaskSchedulerFlag.batLowPrepareFlag == TASK_FLAG_CLEAR )//电池低压预报标志
  4422. {
  4423. LCDPartClear( 119 , 131 , 8 , 1 );
  4424. DisplayHeader( 0x01,0x01,119 );//电池空
  4425. TaskSchedulerFlag.batLowPrepareFlag = TASK_FLAG_WCLEAR;
  4426. }
  4427. else if( TaskSchedulerFlag.batLowPrepareFlag == TASK_FLAG_SET )//电池低压预报标志
  4428. {
  4429. DisplayHeader( 0x01,0x01,120 );//电池一格
  4430. TaskSchedulerFlag.batLowPrepareFlag = TASK_FLAG_WSET;
  4431. }
  4432. }
  4433. }
  4434. }
  4435. /*************************************************************************************
  4436. * Function: DrawRegistingPicture add {} wulianwei
  4437. * Object: 绘制正在注册页面
  4438. * 输入: 无
  4439. * 输出: 无
  4440. * 备注:
  4441. **************************************************************************************/
  4442. void DrawRegistingPicture( void )
  4443. {
  4444. LCDClear( GRAY0 );
  4445. // DrawBatteryDisplay();//电池
  4446. // DrawSignalDisplay();//信号
  4447. Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"正在注册" );//(5,6)
  4448. }
  4449. /*************************************************************************************
  4450. * Function: DrawRegistFailPicture add {} wulianwei
  4451. * Object: 绘制注册失败页面
  4452. * 输入: 无
  4453. * 输出: 无
  4454. * 备注:
  4455. **************************************************************************************/
  4456. void DrawRegistFailPicture( void )
  4457. {
  4458. LCDClear( GRAY0 );
  4459. // DrawBatteryDisplay();//电池
  4460. // DrawSignalDisplay();//信号
  4461. Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"注册失败" );//(5,6)
  4462. }
  4463. /*************************************************************************************
  4464. * Function: DrawRegistSucPicture add {} wulianwei
  4465. * Object: 绘制注册成功页面
  4466. * 输入: 无
  4467. * 输出: 无
  4468. * 备注:
  4469. **************************************************************************************/
  4470. void DrawRegistSucPicture( void )
  4471. {
  4472. LCDClear( GRAY0 );
  4473. // DrawBatteryDisplay();//电池
  4474. // DrawSignalDisplay();//信号
  4475. Gui_DrawFont_GBK16( 20,6,BLACK,GRAY0,"注册成功" );//(5,6)
  4476. }