Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
80:cc2bb7bb8456 | 82:a6f0881074a4 |
---|---|
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 // return 0; |
440 | 440 |
441 if(!DataEX_lost_connection_count()) | 441 // if(!DataEX_lost_connection_count()) return 0; |
442 return 0; | |
443 | 442 |
444 char text[10]; | 443 char text[10]; |
445 | 444 // if(get_DataEX_Error_place()) last_place=get_DataEX_Error_place(); |
446 snprintf(text,10,"\002 %i",DataEX_lost_connection_count()); | 445 |
447 Gfx_write_label_var(ScreenToWriteOn, 600,800, 0,&FontT48,CLUT_ButtonSymbols,text); | 446 // if(get_DataEX_Error_Handler()) last_err=get_DataEX_Error_Handler(); |
447 SDataExchangeSlaveToMaster* dataIn=get_dataInPointer(); | |
448 | |
449 snprintf(text,10,"spi:\002%i",DataEX_lost_connection_count()); | |
450 Gfx_write_label_var(ScreenToWriteOn, 600,800, 0,&FontT24,CLUT_ButtonSymbols,text); | |
451 | |
452 snprintf(text,10,"\002%X%X%X%X",dataIn->header.checkCode[0],dataIn->header.checkCode[1],dataIn->header.checkCode[2],dataIn->header.checkCode[3]); | |
453 Gfx_write_label_var(ScreenToWriteOn, 600,800, 30,&FontT24,CLUT_ButtonSymbols,text); | |
454 | |
455 snprintf(text,10,"\002%X%X%X%X",dataIn->footer.checkCode[0],dataIn->footer.checkCode[1],dataIn->footer.checkCode[2],dataIn->footer.checkCode[3]); | |
456 Gfx_write_label_var(ScreenToWriteOn, 600,800, 60,&FontT24,CLUT_ButtonSymbols,text); | |
457 | |
458 snprintf(text,10,"---"); | |
459 Gfx_write_label_var(ScreenToWriteOn, 600,800, 90,&FontT24,CLUT_ButtonSymbols,text); | |
460 | |
461 snprintf(text,10,"cpt:\002%i",get_num_SPI_CALLBACKS()); | |
462 Gfx_write_label_var(ScreenToWriteOn, 600,800, 120,&FontT24,CLUT_ButtonSymbols,text); | |
463 | |
464 // snprintf(text,10,"i2c:\002%i",get_DataEX_Error_place()); | |
465 // Gfx_write_label_var(ScreenToWriteOn, 600,800, 90,&FontT24,CLUT_ButtonSymbols,text); | |
448 | 466 |
449 return DataEX_lost_connection_count(); | 467 return DataEX_lost_connection_count(); |
450 } | 468 } |