Mercurial > public > ostc4
diff Discovery/Src/tInfoCompass.c @ 243:b7b481df4f22 div-fixes-5
debug: add SPI error counter to compass calibration
This is a debug only extension. It is possible to force SPI errors
and a failing compass calibration by rotating fast during the
calibration cycle. This extra debug output (only activated with
the proper #define statements) is a first aid in helping to
find the underlying issue.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Mon, 08 Apr 2019 12:35:59 +0200 |
parents | 5f11787b4f42 |
children |
line wrap: on
line diff
--- a/Discovery/Src/tInfoCompass.c Mon Apr 08 12:02:07 2019 +0200 +++ b/Discovery/Src/tInfoCompass.c Mon Apr 08 12:35:59 2019 +0200 @@ -27,11 +27,13 @@ ////////////////////////////////////////////////////////////////////////////// /* Includes ------------------------------------------------------------------*/ + +#include "gfx_engine.h" +#include "gfx_fonts.h" +#include "tHome.h" +#include "tInfo.h" #include "tInfoCompass.h" -#include "gfx_fonts.h" -#include "tInfo.h" - #include <string.h> /* Private variables ---------------------------------------------------------*/ @@ -59,8 +61,10 @@ /// @brief there is only compass_DX_f, compass_DY_f, compass_DZ_f output during this mode /// the accel is not called during this process // =============================================================================== -void refreshInfo_Compass(void) +void refreshInfo_Compass(GFX_DrawCfgScreen s) { + + tHome_show_lost_connection_count(&s); tInfoCompassTimeout--; if(tInfoCompassTimeout == 0) { @@ -94,7 +98,7 @@ } snprintf(text,80,"Time left: %u s",(tInfoCompassTimeout+9)/10); - tInfo_write_content_simple( 20,800, 20, &FontT42, text, CLUT_InfoCompass); + tInfo_write_content_simple( 20,800, 25, &FontT42, text, CLUT_InfoCompass); for(int i = 0; i<3;i ++) {