1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

[Horus] Stats menu refactoring

This commit is contained in:
Bertrand Songis 2016-03-14 21:56:53 +01:00
parent 13657587b1
commit 7adccc23dc
8 changed files with 116 additions and 170 deletions

View file

@ -1,23 +1,23 @@
/* /*
* Copyright (C) OpenTX * Copyright (C) OpenTX
* *
* Based on code named * Based on code named
* th9x - http://code.google.com/p/th9x * th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x * er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x * gruvin9x - http://code.google.com/p/gruvin9x
* *
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
*/ */
#include "../../opentx.h" #include "../../opentx.h"
#include "../../timers.h" #include "../../timers.h"
@ -53,20 +53,18 @@ void menuStatisticsView(uint8_t event)
putsTimer( 12*FW+5*FWNUM+1, FH*0, sessionTimer, 0, 0); putsTimer( 12*FW+5*FWNUM+1, FH*0, sessionTimer, 0, 0);
#if defined(THRTRACE) #if defined(THRTRACE)
coord_t traceRd = (s_traceCnt < 0 ? s_traceWr : 0);
const coord_t x = 5; const coord_t x = 5;
const coord_t y = 60; const coord_t y = 60;
lcdDrawSolidHorizontalLine(x-3, y, MAXTRACE+3+3); lcdDrawSolidHorizontalLine(x-3, y, MAXTRACE+3+3);
lcdDrawSolidVerticalLine(x, y-32, 32+3); lcdDrawSolidVerticalLine(x, y-32, 32+3);
for (coord_t i=0; i<MAXTRACE; i+=6) { for (coord_t i=0; i<MAXTRACE; i+=6) {
lcdDrawSolidVerticalLine(x+i+6, y-1, 3); lcdDrawSolidVerticalLine(x+i+6, y-1, 3);
} }
for (coord_t i=1; i<=MAXTRACE; i++) {
lcdDrawSolidVerticalLine(x+i, y-s_traceBuf[traceRd], s_traceBuf[traceRd]); uint16_t traceRd = s_traceWr > MAXTRACE ? s_traceWr - MAXTRACE : 0;
traceRd++; for (coord_t i=1; i<=MAXTRACE && traceRd<s_traceWr; i++, traceRd++) {
if (traceRd>=MAXTRACE) traceRd = 0; uint8_t h = s_traceBuf[traceRd % MAXTRACE];
if (traceRd==s_traceWr) break; lcdDrawSolidVerticalLine(x+i, y-h, h);
} }
#endif #endif
} }

View file

@ -88,18 +88,10 @@ const uint8_t LBM_STATS_GRAPH_ICON[] = {
#include "mask_stats_graph.lbm" #include "mask_stats_graph.lbm"
}; };
const uint8_t LBM_STATS_VALUE_ICON[] = {
#include "mask_stats_value.lbm"
};
const uint8_t LBM_STATS_TIME_ICON[] = { const uint8_t LBM_STATS_TIME_ICON[] = {
#include "mask_stats_time.lbm" #include "mask_stats_time.lbm"
}; };
const uint8_t LBM_STATS_LUA_ICON[] = {
#include "mask_stats_lua.lbm"
};
const uint8_t LBM_STATS_DEBUG_ICON[] = { const uint8_t LBM_STATS_DEBUG_ICON[] = {
#include "mask_stats_debug.lbm" #include "mask_stats_debug.lbm"
}; };
@ -107,11 +99,7 @@ const uint8_t LBM_STATS_DEBUG_ICON[] = {
const uint8_t * const LBM_STATS_ICONS[] = { const uint8_t * const LBM_STATS_ICONS[] = {
LBM_STATS_ICON, LBM_STATS_ICON,
LBM_STATS_GRAPH_ICON, LBM_STATS_GRAPH_ICON,
LBM_STATS_VALUE_ICON,
LBM_STATS_TIME_ICON, LBM_STATS_TIME_ICON,
#if defined(LUA)
LBM_STATS_LUA_ICON,
#endif
#if defined(DEBUG_TRACE_BUFFER) #if defined(DEBUG_TRACE_BUFFER)
LBM_STATS_DEBUG_ICON LBM_STATS_DEBUG_ICON
#endif #endif

View file

@ -36,15 +36,16 @@ struct point_t {
point_t getPoint(uint8_t i) point_t getPoint(uint8_t i)
{ {
point_t result = {0, 0}; point_t result = {0, 0};
CurveInfo &crv = g_model.curves[s_curveChan]; CurveInfo & crv = g_model.curves[s_curveChan];
int8_t *points = curveAddress(s_curveChan); int8_t * points = curveAddress(s_curveChan);
bool custom = (crv.type == CURVE_TYPE_CUSTOM); bool custom = (crv.type == CURVE_TYPE_CUSTOM);
uint8_t count = 5+crv.points; uint8_t count = 5+crv.points;
if (i < count) { if (i < count) {
result.x = CURVE_CENTER_X-1-CURVE_SIDE_WIDTH+i*CURVE_SIDE_WIDTH*2/(count-1); result.x = CURVE_CENTER_X-1-CURVE_SIDE_WIDTH+i*CURVE_SIDE_WIDTH*2/(count-1);
result.y = CURVE_CENTER_Y - (points[i]) * (CURVE_SIDE_WIDTH-1) / 100; result.y = CURVE_CENTER_Y - (points[i]) * (CURVE_SIDE_WIDTH-1) / 100;
if (custom && i>0 && i<count-1) if (custom && i>0 && i<count-1) {
result.x = CURVE_CENTER_X-1-CURVE_SIDE_WIDTH + (100 + (100 + points[count+i-1]) * (2*CURVE_SIDE_WIDTH)) / 200; result.x = CURVE_CENTER_X - 1 - CURVE_SIDE_WIDTH + (100 + (100 + points[count + i - 1]) * (2 * CURVE_SIDE_WIDTH)) / 200;
}
} }
return result; return result;
} }

View file

@ -147,31 +147,21 @@ static const MenuHandlerFunc menuTabGeneral[] PROGMEM = {
enum EnumTabDiag enum EnumTabDiag
{ {
e_StatsGraph, e_StatsGraph,
e_StatsValue, e_StatsDebug,
e_StatsTime,
#if defined(LUA)
e_StatsLua,
#endif
#if defined(DEBUG_TRACE_BUFFER) #if defined(DEBUG_TRACE_BUFFER)
s_StatsDebug, e_StatsTraces,
#endif #endif
}; };
bool menuStatsGraph(evt_t event); bool menuStatsGraph(evt_t event);
bool menuStatsValue(evt_t event);
bool menuStatsTime(evt_t event);
bool menuStatsLua(evt_t event);
bool menuStatsDebug(evt_t event); bool menuStatsDebug(evt_t event);
bool menuStatsTraces(evt_t event);
static const MenuHandlerFunc menuTabStats[] PROGMEM = { static const MenuHandlerFunc menuTabStats[] PROGMEM = {
menuStatsGraph, menuStatsGraph,
menuStatsValue,
menuStatsTime,
#if defined(LUA)
menuStatsLua,
#endif
#if defined(DEBUG_TRACE_BUFFER)
menuStatsDebug, menuStatsDebug,
#if defined(DEBUG_TRACE_BUFFER)
menuStatsTraces,
#endif #endif
}; };

View file

@ -22,31 +22,68 @@
#include "stamp.h" #include "stamp.h"
#define MENU_STATS_COLUMN1 (MENUS_MARGIN_LEFT + 120) #define MENU_STATS_COLUMN1 (MENUS_MARGIN_LEFT + 120)
#define MENU_STATS_COLUMN2 (LCD_W/2)
#define MENU_STATS_COLUMN3 (LCD_W/2 + 120)
bool menuStatsGraph(evt_t event) bool menuStatsGraph(evt_t event)
{ {
MENU("Throttle graph", LBM_STATS_ICONS, menuTabStats, e_StatsGraph, 0, { 0 }); MENU("Statistics", LBM_STATS_ICONS, menuTabStats, e_StatsGraph, 0, { 0 });
coord_t traceRd = (s_traceCnt < 0 ? s_traceWr : 0); lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP, "Session");
const coord_t x = 4; putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP, sessionTimer, TIMEHOUR);
const coord_t y = 200; lcdDrawText(MENU_STATS_COLUMN2, MENU_CONTENT_TOP, "Battery");
putsTimer(MENU_STATS_COLUMN3, MENU_CONTENT_TOP, g_eeGeneral.globalTimer+sessionTimer, TIMEHOUR);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+FH, "Throttle");
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+FH, s_timeCumThr);
lcdDrawText(MENU_STATS_COLUMN2, MENU_CONTENT_TOP+FH, "Throttle %");
putsTimer(MENU_STATS_COLUMN3, MENU_CONTENT_TOP+FH, s_timeCum16ThrP/16);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+2*FH, "Timers");
lcdDrawText(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+2*FH, "[1]", HEADER_COLOR);
putsTimer(lcdNextPos+5, MENU_CONTENT_TOP+2*FH, timersStates[0].val);
lcdDrawText(MENU_STATS_COLUMN2, MENU_CONTENT_TOP+2*FH, "[2]", HEADER_COLOR);
putsTimer(lcdNextPos+10, MENU_CONTENT_TOP+2*FH, timersStates[2].val);
lcdDrawText(MENU_STATS_COLUMN3, MENU_CONTENT_TOP+2*FH, "[3]", HEADER_COLOR);
putsTimer(lcdNextPos+10, MENU_CONTENT_TOP+2*FH, timersStates[3].val);
const coord_t x = 10;
const coord_t y = 240;
lcdDrawHorizontalLine(x-3, y, MAXTRACE+3+3, SOLID, TEXT_COLOR); lcdDrawHorizontalLine(x-3, y, MAXTRACE+3+3, SOLID, TEXT_COLOR);
lcdDrawVerticalLine(x, y-96, 96+3, SOLID, TEXT_COLOR); lcdDrawVerticalLine(x, y-96, 96+3, SOLID, TEXT_COLOR);
for (coord_t i=0; i<MAXTRACE; i+=6) { for (coord_t i=0; i<MAXTRACE; i+=6) {
lcdDrawVerticalLine(x+i+6, y-1, 3, SOLID, TEXT_COLOR); lcdDrawVerticalLine(x+i, y-1, 3, SOLID, TEXT_COLOR);
} }
for (coord_t i=1; i<=MAXTRACE; i++) {
lcdDrawVerticalLine(x+i, y-3*s_traceBuf[traceRd], 3*s_traceBuf[traceRd], SOLID, TEXT_COLOR); uint16_t traceRd = s_traceWr > MAXTRACE ? s_traceWr - MAXTRACE : 0;
traceRd++; coord_t prev_yv = (coord_t)-1;
if (traceRd>=MAXTRACE) traceRd = 0; for (coord_t i=1; i<=MAXTRACE && traceRd<s_traceWr; i++, traceRd++) {
if (traceRd==s_traceWr) break; uint8_t h = s_traceBuf[traceRd % MAXTRACE];
coord_t yv = y - 2 - 3*h;
if (prev_yv != (coord_t)-1) {
if (prev_yv < yv) {
for (int y=prev_yv; y<=yv; y++) {
lcdDrawBitmapPattern(x + i - 3, y, LBM_POINT, TEXT_COLOR);
}
}
else {
for (int y=yv; y<=prev_yv; y++) {
lcdDrawBitmapPattern(x + i - 3, y, LBM_POINT, TEXT_COLOR);
}
}
}
else {
lcdDrawBitmapPattern(x + i - 3, yv, LBM_POINT, TEXT_COLOR);
}
prev_yv = yv;
} }
return true; return true;
} }
bool menuStatsValue(evt_t event) bool menuStatsDebug(evt_t event)
{ {
switch(event) switch(event)
{ {
@ -60,11 +97,15 @@ bool menuStatsValue(evt_t event)
case EVT_KEY_FIRST(KEY_ENTER): case EVT_KEY_FIRST(KEY_ENTER):
maxMixerDuration = 0; maxMixerDuration = 0;
#if defined(LUA)
maxLuaInterval = 0;
maxLuaDuration = 0;
#endif
AUDIO_KEYPAD_UP(); AUDIO_KEYPAD_UP();
break; break;
} }
MENU("Values", LBM_STATS_ICONS, menuTabStats, e_StatsValue, 0, { 0 }); MENU("Debug", LBM_STATS_ICONS, menuTabStats, e_StatsDebug, 0, { 0 });
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP, "Free Mem"); lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP, "Free Mem");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP, availableMemory(), LEFT, 0, NULL, "b"); lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP, availableMemory(), LEFT, 0, NULL, "b");
@ -80,89 +121,29 @@ bool menuStatsValue(evt_t event)
lcdDrawText(lcdNextPos+20, MENU_CONTENT_TOP+2*FH+1, "[Audio]", HEADER_COLOR|SMLSIZE); lcdDrawText(lcdNextPos+20, MENU_CONTENT_TOP+2*FH+1, "[Audio]", HEADER_COLOR|SMLSIZE);
lcdDrawNumber(lcdNextPos+5, MENU_CONTENT_TOP+2*FH, audioStack.available(), LEFT); lcdDrawNumber(lcdNextPos+5, MENU_CONTENT_TOP+2*FH, audioStack.available(), LEFT);
#if defined(LUA)
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+3*FH, "Free Mem");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+3*FH, availableMemory(), LEFT, 0, NULL, "b");
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+4*FH, "Lua duration");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+4*FH, 10*maxLuaDuration, LEFT, 0, NULL, "ms");
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+5*FH, "Lua interval");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+5*FH, 10*maxLuaInterval, LEFT, 0, NULL, "ms");
#endif
lcdDrawText(LCD_W/2, MENU_FOOTER_TOP+2, STR_MENUTORESET, CENTERED); lcdDrawText(LCD_W/2, MENU_FOOTER_TOP+2, STR_MENUTORESET, CENTERED);
return true; return true;
} }
bool menuStatsTime(evt_t event)
{
switch(event) {
case EVT_KEY_LONG(KEY_MENU):
g_eeGeneral.globalTimer = 0;
storageDirty(EE_GENERAL);
sessionTimer = 0;
break;
}
MENU("Time Stats", LBM_STATS_ICONS, menuTabStats, e_StatsTime, 0, { 0 });
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP, "Session", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP, sessionTimer, TIMEHOUR);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+FH, "Battery", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+FH, g_eeGeneral.globalTimer+sessionTimer, TIMEHOUR);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+2*FH, "Timer1", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+2*FH, timersStates[0].val);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+3*FH, "Timer2", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+3*FH, timersStates[2].val);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+4*FH, "Timer3", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+4*FH, timersStates[3].val);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+5*FH, "Throttle", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+5*FH, s_timeCumThr);
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+6*FH, "Throttle %", HEADER_COLOR);
putsTimer(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+6*FH, s_timeCum16ThrP/16);
return true;
}
#if defined(LUA)
bool menuStatsLua(evt_t event)
{
switch(event)
{
case EVT_KEY_LONG(KEY_ENTER):
g_eeGeneral.globalTimer = 0;
storageDirty(EE_GENERAL);
sessionTimer = 0;
killEvents(event);
AUDIO_KEYPAD_UP();
break;
case EVT_KEY_FIRST(KEY_ENTER):
maxLuaInterval = 0;
maxLuaDuration = 0;
AUDIO_KEYPAD_UP();
break;
}
MENU("LUA", LBM_STATS_ICONS, menuTabStats, e_StatsLua, 0, { 0 });
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP, "Free Mem");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP, availableMemory(), LEFT, 0, NULL, "b");
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+FH, "Duration");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+FH, 10*maxLuaDuration, LEFT, 0, NULL, "ms");
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+2*FH, "Interval");
lcdDrawNumber(MENU_STATS_COLUMN1, MENU_CONTENT_TOP+2*FH, 10*maxLuaInterval, LEFT, 0, NULL, "ms");
return true;
}
#endif
#if defined(DEBUG_TRACE_BUFFER) #if defined(DEBUG_TRACE_BUFFER)
#define STATS_TRACES_INDEX_POS MENUS_MARGIN_LEFT #define STATS_TRACES_INDEX_POS MENUS_MARGIN_LEFT
#define STATS_TRACES_TIME_POS MENUS_MARGIN_LEFT + 4*10 #define STATS_TRACES_TIME_POS MENUS_MARGIN_LEFT + 4*10
#define STATS_TRACES_EVENT_POS MENUS_MARGIN_LEFT + 14*10 #define STATS_TRACES_EVENT_POS MENUS_MARGIN_LEFT + 14*10
#define STATS_TRACES_DATA_POS MENUS_MARGIN_LEFT + 20*10 #define STATS_TRACES_DATA_POS MENUS_MARGIN_LEFT + 20*10
bool menuStatsDebug(evt_t event) bool menuStatsTraces(evt_t event)
{ {
switch(event) switch(event)
{ {
@ -172,7 +153,7 @@ bool menuStatsDebug(evt_t event)
break; break;
} }
SIMPLE_MENU("", LBM_STATS_ICONS, menuTabStats, s_StatsDebug, TRACE_BUFFER_LEN); SIMPLE_MENU("", LBM_STATS_ICONS, menuTabStats, e_StatsTraces, TRACE_BUFFER_LEN);
uint8_t k = 0; uint8_t k = 0;
int8_t sub = menuVerticalPosition; int8_t sub = menuVerticalPosition;

View file

@ -69,20 +69,18 @@ void menuStatisticsView(uint8_t event)
} }
#if defined(THRTRACE) #if defined(THRTRACE)
coord_t traceRd = (s_traceCnt < 0 ? s_traceWr : 0);
const coord_t x = 5; const coord_t x = 5;
const coord_t y = 60; const coord_t y = 60;
lcdDrawSolidHorizontalLine(x-3, y, MAXTRACE+3+3); lcdDrawSolidHorizontalLine(x-3, y, MAXTRACE+3+3);
lcdDrawSolidVerticalLine(x, y-32, 32+3); lcdDrawSolidVerticalLine(x, y-32, 32+3);
for (coord_t i=0; i<MAXTRACE; i+=6) { for (coord_t i=0; i<MAXTRACE; i+=6) {
lcdDrawSolidVerticalLine(x+i+6, y-1, 3); lcdDrawSolidVerticalLine(x+i+6, y-1, 3);
} }
for (coord_t i=1; i<=MAXTRACE; i++) {
lcdDrawSolidVerticalLine(x+i, y-s_traceBuf[traceRd], s_traceBuf[traceRd]); uint16_t traceRd = s_traceWr > MAXTRACE ? s_traceWr - MAXTRACE : 0;
traceRd++; for (coord_t i=1; i<=MAXTRACE && traceRd<s_traceWr; i++, traceRd++) {
if (traceRd>=MAXTRACE) traceRd = 0; uint8_t h = s_traceBuf[traceRd % MAXTRACE];
if (traceRd==s_traceWr) break; lcdDrawSolidVerticalLine(x+i, y-h, h);
} }
#endif #endif
} }

View file

@ -1717,13 +1717,7 @@ void flightReset()
#if defined(THRTRACE) #if defined(THRTRACE)
uint8_t s_traceBuf[MAXTRACE]; uint8_t s_traceBuf[MAXTRACE];
#if LCD_W >= 255 uint16_t s_traceWr;
int16_t s_traceWr;
int16_t s_traceCnt;
#else
uint8_t s_traceWr;
int16_t s_traceCnt;
#endif
uint8_t s_cnt_10s; uint8_t s_cnt_10s;
uint16_t s_cnt_samples_thr_10s; uint16_t s_cnt_samples_thr_10s;
uint16_t s_sum_samples_thr_10s; uint16_t s_sum_samples_thr_10s;
@ -1918,10 +1912,8 @@ void doMixerCalculations()
val = s_sum_samples_thr_10s / s_cnt_samples_thr_10s; val = s_sum_samples_thr_10s / s_cnt_samples_thr_10s;
s_sum_samples_thr_10s = 0; s_sum_samples_thr_10s = 0;
s_cnt_samples_thr_10s = 0; s_cnt_samples_thr_10s = 0;
s_traceBuf[s_traceWr % MAXTRACE] = val;
s_traceBuf[s_traceWr++] = val; s_traceWr++;
if (s_traceWr >= MAXTRACE) s_traceWr = 0;
if (s_traceCnt >= 0) s_traceCnt++;
} }
#endif #endif

View file

@ -929,19 +929,17 @@ extern uint16_t lastMixerDuration;
#endif #endif
#if defined(THRTRACE) #if defined(THRTRACE)
#define MAXTRACE (LCD_W - 8) #if defined(COLORLCD)
extern uint8_t s_traceBuf[MAXTRACE]; #define MAXTRACE (LCD_W-2*10)
#if LCD_W >= 255
extern int16_t s_traceWr;
extern int16_t s_traceCnt;
#else #else
extern uint8_t s_traceWr; #define MAXTRACE (LCD_W - 8)
extern int16_t s_traceCnt;
#endif #endif
extern uint8_t s_traceBuf[MAXTRACE];
extern uint16_t s_traceWr;
extern uint8_t s_cnt_10s; extern uint8_t s_cnt_10s;
extern uint16_t s_cnt_samples_thr_10s; extern uint16_t s_cnt_samples_thr_10s;
extern uint16_t s_sum_samples_thr_10s; extern uint16_t s_sum_samples_thr_10s;
#define RESET_THR_TRACE() s_traceCnt = s_traceWr = s_cnt_10s = s_cnt_samples_thr_10s = s_sum_samples_thr_10s = s_timeCum16ThrP = s_timeCumThr = 0 #define RESET_THR_TRACE() s_traceWr = s_cnt_10s = s_cnt_samples_thr_10s = s_sum_samples_thr_10s = s_timeCum16ThrP = s_timeCumThr = 0
#else #else
#define RESET_THR_TRACE() s_timeCum16ThrP = s_timeCumThr = 0 #define RESET_THR_TRACE() s_timeCum16ThrP = s_timeCumThr = 0
#endif #endif