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