Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
114:79b19d56ab08 | 115:3834b6272ee5 |
---|---|
434 return (uint8_t) snprintf(text,10,"%02i/%02i",oxygen_percentage,helium_percentage); | 434 return (uint8_t) snprintf(text,10,"%02i/%02i",oxygen_percentage,helium_percentage); |
435 } | 435 } |
436 | 436 |
437 uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn) | 437 uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn) |
438 { | 438 { |
439 return 0; | 439 if(!SPI_MIN_ERROR_SHOW) return 0; |
440 | 440 if(DataEX_lost_connection_count()>=SPI_MIN_ERROR_SHOW){ |
441 if(!DataEX_lost_connection_count()) | 441 |
442 return 0; | 442 char text[64]; |
443 | 443 |
444 char text[10]; | 444 SDataExchangeSlaveToMaster* dataIn=get_dataInPointer(); |
445 | 445 |
446 snprintf(text,10,"\002 %i",DataEX_lost_connection_count()); | 446 snprintf(text,32,"spi err:\002 %i/%i",DataEX_lost_connection_count(),get_num_SPI_CALLBACKS()); |
447 Gfx_write_label_var(ScreenToWriteOn, 600,800, 0,&FontT48,CLUT_ButtonSymbols,text); | 447 Gfx_write_label_var(ScreenToWriteOn, 100,300, 0,&FontT24,CLUT_ButtonSymbols,text); |
448 | |
449 // 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]); | |
450 // Gfx_write_label_var(ScreenToWriteOn, 350,550, 0,&FontT24,CLUT_ButtonSymbols,text); | |
451 | |
452 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]); | |
453 Gfx_write_label_var(ScreenToWriteOn, 600,800, 0,&FontT24,CLUT_ButtonSymbols,text); | |
454 } | |
455 | |
456 | |
457 | |
458 // snprintf(text,32,"cpt:\002%i",get_num_SPI_CALLBACKS()); | |
459 // Gfx_write_label_var(ScreenToWriteOn, 600,800, 90,&FontT24,CLUT_ButtonSymbols,text); | |
460 | |
461 // snprintf(text,10,"i2c:\002%i",get_DataEX_Error_place()); | |
462 // Gfx_write_label_var(ScreenToWriteOn, 600,800, 90,&FontT24,CLUT_ButtonSymbols,text); | |
448 | 463 |
449 return DataEX_lost_connection_count(); | 464 return DataEX_lost_connection_count(); |
450 } | 465 } |