From 6c7e4b5597878432c9562e03c80f1a5cba5719f9 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Fri, 10 Nov 2017 17:23:09 +0100 Subject: [PATCH] =?UTF-8?q?Debug=20Timers:=20add=2010ms=20period=20measure?= =?UTF-8?q?ment,=20delete=20unused=20timer=20debugT=E2=80=A6=20(#5319)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Debug Timers: add 10ms period measurement, delete unused timer debugTimerPerMainPeriod * Typo in drawSplash() if MENUS_LOCK == 1 --- radio/src/debug.cpp | 2 +- radio/src/debug.h | 2 +- radio/src/gui/480x272/splash.cpp | 2 +- radio/src/targets/horus/board.cpp | 1 + radio/src/targets/taranis/board.cpp | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/radio/src/debug.cpp b/radio/src/debug.cpp index 263af82c2..af883134e 100644 --- a/radio/src/debug.cpp +++ b/radio/src/debug.cpp @@ -235,12 +235,12 @@ const char * const debugTimerNames[DEBUG_TIMERS_COUNT] = { "Pulses int." // debugTimerIntPulses, ,"Pulses dur." // debugTimerIntPulsesDuration, ,"10ms dur. " // debugTimerPer10ms, + ,"10ms period" // debugTimerPer10msPeriod, ,"Rotary enc." // debugTimerRotEnc, ,"Haptic " // debugTimerHaptic, ,"Mixer calc " // debugTimerMixer, ,"Tel. wakeup" // debugTimerTelemetryWakeup, ,"perMain dur" // debugTimerPerMain, - ," period " // debugTimerPerMainPeriod, ," perMain s1" // debugTimerPerMain1, ," guiMain " // debugTimerGuiMain, ," LUA bg " // debugTimerLuaBg, diff --git a/radio/src/debug.h b/radio/src/debug.h index ce4e9c9f8..e951eea65 100644 --- a/radio/src/debug.h +++ b/radio/src/debug.h @@ -369,12 +369,12 @@ enum DebugTimers { debugTimerIntPulses, debugTimerIntPulsesDuration, debugTimerPer10ms, + debugTimerPer10msPeriod, debugTimerRotEnc, debugTimerHaptic, debugTimerMixer, debugTimerTelemetryWakeup, debugTimerPerMain, - debugTimerPerMainPeriod, debugTimerPerMain1, debugTimerGuiMain, debugTimerLuaBg, diff --git a/radio/src/gui/480x272/splash.cpp b/radio/src/gui/480x272/splash.cpp index 1bebd12fd..94fddb08b 100644 --- a/radio/src/gui/480x272/splash.cpp +++ b/radio/src/gui/480x272/splash.cpp @@ -29,7 +29,7 @@ void drawSplash() #if MENUS_LOCK == 1 if (readonly == false) { - lcdDrawSolidFilledRect((LCD_W-(sizeof(TR_UNLOCKED)-1)*FW)/2 - 9, 50, (sizeof(TR_UNLOCKED)-1)*FW+16, 11, SOLID, ROUND); + lcdDrawSolidFilledRect((LCD_W-(sizeof(TR_UNLOCKED)-1)*FW)/2 - 9, 50, (sizeof(TR_UNLOCKED)-1)*FW+16, 11, SOLID|ROUND); lcdDrawText((LCD_W-(sizeof(TR_UNLOCKED)-1)*FW)/2 , 53, STR_UNLOCKED); } #endif diff --git a/radio/src/targets/horus/board.cpp b/radio/src/targets/horus/board.cpp index 23d6fa454..8d6d89baf 100644 --- a/radio/src/targets/horus/board.cpp +++ b/radio/src/targets/horus/board.cpp @@ -80,6 +80,7 @@ void interrupt1ms() if (pre_scale == 10) { pre_scale = 0; DEBUG_TIMER_START(debugTimerPer10ms); + DEBUG_TIMER_SAMPLE(debugTimerPer10msPeriod); per10ms(); DEBUG_TIMER_STOP(debugTimerPer10ms); } diff --git a/radio/src/targets/taranis/board.cpp b/radio/src/targets/taranis/board.cpp index 8dd848b37..7de3b5042 100644 --- a/radio/src/targets/taranis/board.cpp +++ b/radio/src/targets/taranis/board.cpp @@ -82,6 +82,7 @@ void interrupt5ms() if (++pre_scale >= 2) { pre_scale = 0 ; DEBUG_TIMER_START(debugTimerPer10ms); + DEBUG_TIMER_SAMPLE(debugTimerPer10msPeriod); per10ms(); DEBUG_TIMER_STOP(debugTimerPer10ms); }