Mercurial > public > ostc4
diff Discovery/Src/t7.c @ 198:878dc9e0dbc5 div-fixes-cleaup-2
cleanup: another cleanup session (data_exchange_main.c)
Cleanup all kinds of stuff in one of the core functions. Made local
data static, with 1 already existing exception (the dataIn data). For
this, a trivial change is made in t7.c. In addition, not used code, and
commented out code that seems highly obsolete is removed. Another tiny
step in code that is better to maintain in the future.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Thu, 21 Mar 2019 15:28:47 +0100 |
parents | 2885628ab3ba |
children | b2a9e9b02df0 |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Thu Mar 21 11:41:59 2019 +0100 +++ b/Discovery/Src/t7.c Thu Mar 21 15:28:47 2019 +0100 @@ -1207,7 +1207,7 @@ uint32_t color; // uint8_t gasIdFirst; SSettings* pSettings = settingsGetPointer(); - extern SDataExchangeSlaveToMaster dataIn; + SDataExchangeSlaveToMaster *dataIn = get_dataInPointer(); SWindowGimpStyle windowGimp; @@ -1221,7 +1221,7 @@ if(stateUsed->data_old__lost_connection_to_slave) { Gfx_write_label_var(&t7screen, 500,800, 0,&FontT42,CLUT_DiveMainLabel,"old"); - snprintf(TextL1,TEXTSIZE,"%X %X %X %X",dataIn.header.checkCode[0],dataIn.header.checkCode[1],dataIn.header.checkCode[2],dataIn.header.checkCode[3]); + snprintf(TextL1,TEXTSIZE,"%X %X %X %X",dataIn->header.checkCode[0],dataIn->header.checkCode[1],dataIn->header.checkCode[2],dataIn->header.checkCode[3]); Gfx_write_label_var(&t7screen, 500,800, 45,&FontT48,CLUT_Font020,TextL1); } else @@ -1261,7 +1261,7 @@ Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1); // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings; - snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low); + snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn->RTE_VERSION_high,dataIn->RTE_VERSION_low); Gfx_write_label_var(&t7screen, 320,500,100,&FontT42,CLUT_DiveMainLabel,"RTE"); Gfx_write_label_var(&t7screen, 320,500,145,&FontT48,CLUT_Font020,TextL1);