* sport.log only active if SPORT_FILE_LOG=YES
* audio concurrent access fixes
* added IO mutex
* added Event Trace Buffer
* fixed SD card error

Conflicts:
	radio/src/Makefile
	radio/src/targets/taranis/diskio.cpp
This commit is contained in:
Damjan Adamic
2014-10-14 22:43:05 +02:00
committed by bsongis
parent c4c7fed727
commit 874156122d
12 changed files with 901 additions and 578 deletions
+62
View File
@@ -141,6 +141,13 @@ void menuStatisticsDebug(uint8_t event)
maxMixerDuration = 0;
AUDIO_KEYPAD_UP();
break;
#if defined(DEBUG_TRACE_BUFFER)
case EVT_KEY_FIRST(KEY_UP):
pushMenu(menuTraceBuffer);
return;
#endif
case EVT_KEY_FIRST(KEY_DOWN):
chainMenu(menuStatisticsView);
break;
@@ -256,3 +263,58 @@ void menuStatisticsDebug(uint8_t event)
lcd_puts(3*FW, 7*FH+1, STR_MENUTORESET);
lcd_status_line();
}
#if defined(DEBUG_TRACE_BUFFER)
#include "stamp-opentx.h"
void menuTraceBuffer(uint8_t event)
{
switch(event)
{
case EVT_KEY_LONG(KEY_ENTER):
dumpTraceBuffer();
killEvents(event);
break;
}
SIMPLE_SUBMENU("Trace Buffer " VERS_STR, TRACE_BUFFER_LEN);
/* RTC time */
struct gtm t;
gettime(&t);
putsTime(LCD_W+1, 0, t, TIMEBLINK);
uint8_t y = 0;
uint8_t k = 0;
int8_t sub = m_posVert;
lcd_putc(0, FH, '#');
lcd_puts(4*FW, FH, "Time");
lcd_puts(14*FW, FH, "Event");
lcd_puts(20*FW, FH, "Data");
for (uint8_t i=0; i<LCD_LINES-2; i++) {
y = 1 + (i+2)*FH;
k = i+s_pgOfs;
//item
lcd_outdezAtt(0, y, k, LEFT | (sub==k ? INVERS : 0));
const struct TraceElement * te = getTraceElement(k);
if (te) {
//time
putstime_t tme = te->time % SECS_PER_DAY;
putsTimer(4*FW, y, tme, TIMEHOUR|LEFT, TIMEHOUR|LEFT);
//event
lcd_outdezNAtt(14*FW, y, te->event, LEADING0|LEFT, 3);
//data
lcd_putsn (20*FW, y, "0x", 2);
lcd_outhex4(22*FW-2, y, (uint16_t)(te->data >> 16));
lcd_outhex4(25*FW, y, (uint16_t)(te->data & 0xFFFF));
}
}
}
#endif //#if defined(DEBUG_TRACE_BUFFER)