[Taranis] Cleaner reboot on USB disconnect, longer LCD initialization delay to compensate for the time saved removing USB initialisation

This commit is contained in:
bernet.andre@gmail.com
2013-06-25 10:45:10 +00:00
parent a9208deb91
commit c924a369d7
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -4194,7 +4194,7 @@ inline void opentxInit(OPENTX_INIT_ARGS)
{
#if defined(PCBTARANIS)
BACKLIGHT_ON();
CoTickDelay(10); //20ms
CoTickDelay(50); //100ms
Splash();
#endif
+6
View File
@@ -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();
}