mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Emit progress events from firmware updates
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									724170f4b6
								
							
						
					
					
						commit
						cbdaec4d9d
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -1545,8 +1545,15 @@ void FirmwareUpdateThread::run() | |||
| { | ||||
| 	bool supported = false; | ||||
| 	dc_status_t rc; | ||||
| 
 | ||||
| 	rc = dc_device_open(&m_data->device, m_data->context, m_data->descriptor, m_data->devname); | ||||
| 	if (rc == DC_STATUS_SUCCESS) { | ||||
| 		rc = dc_device_set_events(m_data->device, DC_EVENT_PROGRESS, DeviceThread::event_cb, this); | ||||
| 		if (rc != DC_STATUS_SUCCESS) { | ||||
| 			emit error("Error registering the event handler."); | ||||
| 			dc_device_close(m_data->device); | ||||
| 			return; | ||||
| 		} | ||||
| 		switch (dc_device_get_type(m_data->device)) { | ||||
| #if DC_VERSION_CHECK(0, 5, 0) | ||||
| 		case DC_FAMILY_HW_OSTC3: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue