diff Discovery/Src/tHome.c @ 115:3834b6272ee5 FlipDisplay

Merge with 68181cd61f2069d061621c2cd2a6afddb7486f5e
author Ideenmodellierer
date Thu, 03 Jan 2019 19:59:36 +0100
parents 22a1094545f3
children cc9c18075e00
line wrap: on
line diff
--- a/Discovery/Src/tHome.c	Thu Jan 03 18:35:11 2019 +0100
+++ b/Discovery/Src/tHome.c	Thu Jan 03 19:59:36 2019 +0100
@@ -436,15 +436,30 @@
 
 uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn)
 {
-    return 0;
+	if(!SPI_MIN_ERROR_SHOW) return 0;
+	if(DataEX_lost_connection_count()>=SPI_MIN_ERROR_SHOW){
+
+    char text[64];
 
-    if(!DataEX_lost_connection_count())
-        return 0;
+    SDataExchangeSlaveToMaster* dataIn=get_dataInPointer();
+
+    snprintf(text,32,"spi err:\002 %i/%i",DataEX_lost_connection_count(),get_num_SPI_CALLBACKS());
+    Gfx_write_label_var(ScreenToWriteOn,  100,300, 0,&FontT24,CLUT_ButtonSymbols,text);
 
-    char text[10];
+//    snprintf(text,32,"header:\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,  350,550, 0,&FontT24,CLUT_ButtonSymbols,text);
+
+    snprintf(text,32,"footer:\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, 0,&FontT24,CLUT_ButtonSymbols,text);
+    }
 
-    snprintf(text,10,"\002   %i",DataEX_lost_connection_count());
-    Gfx_write_label_var(ScreenToWriteOn,  600,800, 0,&FontT48,CLUT_ButtonSymbols,text);
+
+
+//    snprintf(text,32,"cpt:\002%i",get_num_SPI_CALLBACKS());
+//    Gfx_write_label_var(ScreenToWriteOn,  600,800, 90,&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();
 }