[Taranis] Cleaner reboot on USB disconnect, longer LCD initialization delay to compensate for the time saved removing USB initialisation
This commit is contained in:
+1
-1
@@ -4194,7 +4194,7 @@ inline void opentxInit(OPENTX_INIT_ARGS)
|
|||||||
{
|
{
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
BACKLIGHT_ON();
|
BACKLIGHT_ON();
|
||||||
CoTickDelay(10); //20ms
|
CoTickDelay(50); //100ms
|
||||||
Splash();
|
Splash();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ void USBD_USR_DeviceConnected (void)
|
|||||||
*/
|
*/
|
||||||
void USBD_USR_DeviceDisconnected (void)
|
void USBD_USR_DeviceDisconnected (void)
|
||||||
{
|
{
|
||||||
|
// TODO: Separate the shutdown operations in main() into a shutdown() function in opentx.cpp,
|
||||||
|
// and call that before the NVIC_SystemReset()?
|
||||||
|
g_eeGeneral.unexpectedShutdown = 0;
|
||||||
|
eeDirty(EE_GENERAL);
|
||||||
|
eeCheck(true);
|
||||||
|
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user