Mercurial > public > ostc4
diff Discovery/Src/tHome.c @ 82:a6f0881074a4 kittz
+i2c analog noise filtering
spi more stable
author | Dmitry Romanov <kitt@bk.ru> |
---|---|
date | Tue, 20 Nov 2018 12:08:19 +0300 |
parents | 5f11787b4f42 |
children | e6abbef57475 |
line wrap: on
line diff
--- a/Discovery/Src/tHome.c Sat Oct 06 15:02:11 2018 +0200 +++ b/Discovery/Src/tHome.c Tue Nov 20 12:08:19 2018 +0300 @@ -436,15 +436,33 @@ uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn) { - return 0; +// return 0; - if(!DataEX_lost_connection_count()) - return 0; +// if(!DataEX_lost_connection_count()) return 0; char text[10]; +// if(get_DataEX_Error_place()) last_place=get_DataEX_Error_place(); - snprintf(text,10,"\002 %i",DataEX_lost_connection_count()); - Gfx_write_label_var(ScreenToWriteOn, 600,800, 0,&FontT48,CLUT_ButtonSymbols,text); +// if(get_DataEX_Error_Handler()) last_err=get_DataEX_Error_Handler(); + SDataExchangeSlaveToMaster* dataIn=get_dataInPointer(); + + snprintf(text,10,"spi:\002%i",DataEX_lost_connection_count()); + Gfx_write_label_var(ScreenToWriteOn, 600,800, 0,&FontT24,CLUT_ButtonSymbols,text); + + snprintf(text,10,"\002%X%X%X%X",dataIn->header.checkCode[0],dataIn->header.checkCode[1],dataIn->header.checkCode[2],dataIn->header.checkCode[3]); + Gfx_write_label_var(ScreenToWriteOn, 600,800, 30,&FontT24,CLUT_ButtonSymbols,text); + + snprintf(text,10,"\002%X%X%X%X",dataIn->footer.checkCode[0],dataIn->footer.checkCode[1],dataIn->footer.checkCode[2],dataIn->footer.checkCode[3]); + Gfx_write_label_var(ScreenToWriteOn, 600,800, 60,&FontT24,CLUT_ButtonSymbols,text); + + snprintf(text,10,"---"); + Gfx_write_label_var(ScreenToWriteOn, 600,800, 90,&FontT24,CLUT_ButtonSymbols,text); + + snprintf(text,10,"cpt:\002%i",get_num_SPI_CALLBACKS()); + Gfx_write_label_var(ScreenToWriteOn, 600,800, 120,&FontT24,CLUT_ButtonSymbols,text); + +// snprintf(text,10,"i2c:\002%i",get_DataEX_Error_place()); +// Gfx_write_label_var(ScreenToWriteOn, 600,800, 90,&FontT24,CLUT_ButtonSymbols,text); return DataEX_lost_connection_count(); }