[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)
|
||||
BACKLIGHT_ON();
|
||||
CoTickDelay(10); //20ms
|
||||
CoTickDelay(50); //100ms
|
||||
Splash();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -119,6 +119,12 @@ void USBD_USR_DeviceConnected (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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user