Mercurial > public > ostc4
changeset 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 | b23de15e2861 |
children | c20c73b0d034 |
files | Discovery/Inc/tInfoCompass.h Discovery/Src/tInfo.c Discovery/Src/tInfoCompass.c |
diffstat | 3 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Inc/tInfoCompass.h Mon Apr 08 12:02:07 2019 +0200 +++ b/Discovery/Inc/tInfoCompass.h Mon Apr 08 12:35:59 2019 +0200 @@ -30,7 +30,7 @@ /* Exported functions --------------------------------------------------------*/ void openInfo_Compass(void); -void refreshInfo_Compass(void); +void refreshInfo_Compass(GFX_DrawCfgScreen s); #endif /* TINFO_COMPASS_H */
--- a/Discovery/Src/tInfo.c Mon Apr 08 12:02:07 2019 +0200 +++ b/Discovery/Src/tInfo.c Mon Apr 08 12:35:59 2019 +0200 @@ -210,7 +210,7 @@ if(inDebugMode()) tDebug_refresh(); else - refreshInfo_Compass(); + refreshInfo_Compass(tIscreen); if(inDebugMode() || (get_globalState() == StICOMPASS)) /* could be timeout and exitInfo */ GFX_SetFramesTopBottom(tIscreen.FBStartAdress, 0,480);
--- 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 ++) {