[sky9x] Protection against USB detection in flight due to temperature...
This commit is contained in:
+17
-5
@@ -77,21 +77,33 @@ uint32_t check_soft_power()
|
|||||||
return e_power_on;
|
return e_power_on;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( PIOC->PIO_PDSR & 0x02000000 )
|
|
||||||
{
|
|
||||||
return e_power_usb ; // Detected USB
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef REVB
|
#ifdef REVB
|
||||||
if ( PIOC->PIO_PDSR & PIO_PC17 ) // Power on
|
if ( PIOC->PIO_PDSR & PIO_PC17 ) // Power on
|
||||||
{
|
{
|
||||||
return e_power_on ;
|
return e_power_on ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( PIOC->PIO_PDSR & PIO_PC25 )
|
||||||
|
{
|
||||||
|
return e_power_usb ; // Detected USB
|
||||||
|
}
|
||||||
|
|
||||||
if ( PIOA->PIO_PDSR & PIO_PA8 ) // Trainer plugged in
|
if ( PIOA->PIO_PDSR & PIO_PA8 ) // Trainer plugged in
|
||||||
{
|
{
|
||||||
return e_power_trainer ;
|
return e_power_trainer ;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if ( PIOC->PIO_PDSR & PIO_PC25 )
|
||||||
|
{
|
||||||
|
return e_power_usb ; // Detected USB
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( PIOA->PIO_PDSR & PIO_PA8 ) // Trainer plugged in
|
||||||
|
{
|
||||||
|
return e_power_trainer ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return e_power_on;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return e_power_off;
|
return e_power_off;
|
||||||
|
|||||||
+1
-1
@@ -121,7 +121,7 @@ void audioDefevent(uint8_t e);
|
|||||||
#define AUDIO_TADA() pushPrompt(PROMPT_SYSTEM_BASE+AU_TADA)
|
#define AUDIO_TADA() pushPrompt(PROMPT_SYSTEM_BASE+AU_TADA)
|
||||||
#define AUDIO_TX_BATTERY_LOW() pushPrompt(PROMPT_SYSTEM_BASE+AU_TX_BATTERY_LOW)
|
#define AUDIO_TX_BATTERY_LOW() pushPrompt(PROMPT_SYSTEM_BASE+AU_TX_BATTERY_LOW)
|
||||||
#define AUDIO_INACTIVITY() pushPrompt(PROMPT_SYSTEM_BASE+AU_INACTIVITY)
|
#define AUDIO_INACTIVITY() pushPrompt(PROMPT_SYSTEM_BASE+AU_INACTIVITY)
|
||||||
#define AUDIO_ERROR_MESSAGE(e) pushPrompt(PROMPT_SYSTEM_BASE+e)
|
#define AUDIO_ERROR_MESSAGE(e) pushPrompt(PROMPT_SYSTEM_BASE+(e))
|
||||||
#define AUDIO_TIMER_30() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_30)
|
#define AUDIO_TIMER_30() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_30)
|
||||||
#define AUDIO_TIMER_20() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_20)
|
#define AUDIO_TIMER_20() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_20)
|
||||||
#define AUDIO_TIMER_10() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_10)
|
#define AUDIO_TIMER_10() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_10)
|
||||||
|
|||||||
Reference in New Issue
Block a user