after dc-download, check if device-controller reboots successfully
This commit is contained in:
		@@ -450,16 +450,25 @@ int Update::run() {
 | 
			
		||||
            qCritical() << "DownloadThread::run(): last result" << (int)sendStatus(m_hw->bl_wasSendingDataOK());
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
        // TODO
 | 
			
		||||
        stopBootloader();   // there is no harm in stopping the bootloader even
 | 
			
		||||
                            // if starting the bootloader failed
 | 
			
		||||
        qInfo() << nextTimePoint().toUtf8().constData() << "<DC-UPDATE-SUCCESS>";
 | 
			
		||||
 | 
			
		||||
        // check if update was successful
 | 
			
		||||
        if (!m_debug) {
 | 
			
		||||
            m_hw->dc_autoRequest(true); //restart dc_autoRequest after download else E255!
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return -(int)Result::SUCCESS;
 | 
			
		||||
        for (int i = 0; i < 3; ++i) {
 | 
			
		||||
            qInfo() << "waiting for device controller restart...(" << i << ")";
 | 
			
		||||
            QThread::sleep(20);
 | 
			
		||||
 | 
			
		||||
            resetDeviceController();
 | 
			
		||||
            if (startBootloader()) {
 | 
			
		||||
                qInfo() << nextTimePoint().toUtf8().constData() << "<DC-UPDATE-SUCCESS>";
 | 
			
		||||
                stopBootloader();
 | 
			
		||||
                return -(int)Result::SUCCESS;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    qInfo() << nextTimePoint().toUtf8().constData() << "<DC-UPDATE-FAILURE>";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user