New "Test" function switch (make DEBUG=YES)
New "Reset" function switch TimeZone for GPS BLINK attribute may be used without INVERS Wrong first frame sent when DSM2=SERIAL (by Cam) Text in status line blinking when NO DATA on FrSky telemetry screen
This commit is contained in:
+32
-10
@@ -1083,6 +1083,16 @@ uint8_t evalSticks(uint8_t phase)
|
||||
return anaCenter;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
* This is a test function for debugging purpose, you may insert there your code and compile with the option DEBUG=YES
|
||||
*/
|
||||
void testFunc()
|
||||
{
|
||||
printf("testFunc\n"); fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint16_t active_functions = 0; // current max = 16 functions
|
||||
|
||||
void evalFunctions()
|
||||
@@ -1111,6 +1121,27 @@ void evalFunctions()
|
||||
if (sd->func == FUNC_PLAY_SOMO && (~active_functions & mask)) {
|
||||
somoPushPrompt(sd->param);
|
||||
}
|
||||
#endif
|
||||
if (sd->func == FUNC_RESET && (~active_functions & mask)) {
|
||||
switch(sd->param) {
|
||||
case 0:
|
||||
case 1:
|
||||
resetTimer(sd->param);
|
||||
break;
|
||||
case 2:
|
||||
resetAll();
|
||||
break;
|
||||
#ifdef FRSKY
|
||||
case 3:
|
||||
resetTelemetry();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
if (sd->func == FUNC_TEST && (~active_functions & mask)) {
|
||||
testFunc();
|
||||
}
|
||||
#endif
|
||||
active_functions |= mask;
|
||||
}
|
||||
@@ -1757,10 +1788,6 @@ uint16_t getTmr16KHz()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
extern uint16_t g_time_per10; // instantiated in menus.cpp
|
||||
#endif
|
||||
|
||||
#if defined (PCBV4)
|
||||
ISR(TIMER2_COMPA_vect, ISR_NOBLOCK) //10ms timer
|
||||
#else
|
||||
@@ -1912,11 +1939,6 @@ extern uint16_t g_timeMain;
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
uint16_t DEBUG1 = 0;
|
||||
uint16_t DEBUG2 = 0;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -1938,7 +1960,7 @@ FORCEINLINE void FRSKY_USART0_vect()
|
||||
|
||||
#if defined (DSM2_SERIAL)
|
||||
FORCEINLINE void DSM2_USART0_vect()
|
||||
{
|
||||
{
|
||||
UDR0 = *((uint16_t*)pulses2MHzRPtr);
|
||||
|
||||
pulses2MHzRPtr += sizeof(uint16_t);
|
||||
|
||||
Reference in New Issue
Block a user