mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Add forcedFirmwareUpgradeSupported to supportedDivecomputers.
Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
		
							parent
							
								
									4ac27e3c71
								
							
						
					
					
						commit
						5511cd13d7
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -104,16 +104,17 @@ struct DiveComputerEntry {
 | 
				
			||||||
	QString product;
 | 
						QString product;
 | 
				
			||||||
	unsigned int transport;
 | 
						unsigned int transport;
 | 
				
			||||||
	bool fwUpgradePossible;
 | 
						bool fwUpgradePossible;
 | 
				
			||||||
 | 
						bool forcedFirmwareUpgradeSupported;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//WARNING: Do not edit this list or even just change its order without
 | 
					//WARNING: Do not edit this list or even just change its order without
 | 
				
			||||||
// making corresponding changes to the `DiveComputerList` element
 | 
					// making corresponding changes to the `DiveComputerList` element
 | 
				
			||||||
// in `configuredivecomputerdialog.ui` or this functionality will stop working.
 | 
					// in `configuredivecomputerdialog.ui` or this functionality will stop working.
 | 
				
			||||||
static const DiveComputerEntry supportedDiveComputers[] = {
 | 
					static const DiveComputerEntry supportedDiveComputers[] = {
 | 
				
			||||||
	{ "Heinrichs Weikamp", "OSTC 2N", DC_TRANSPORT_SERIAL, true },
 | 
						{ "Heinrichs Weikamp", "OSTC 2N", DC_TRANSPORT_SERIAL, true, false },
 | 
				
			||||||
	{ "Heinrichs Weikamp", "OSTC Plus", DC_TRANSPORT_BLUETOOTH, true },
 | 
						{ "Heinrichs Weikamp", "OSTC Plus", DC_TRANSPORT_BLUETOOTH, true, false },
 | 
				
			||||||
	{ "Heinrichs Weikamp", "OSTC 4", DC_TRANSPORT_BLUETOOTH, true },
 | 
						{ "Heinrichs Weikamp", "OSTC 4", DC_TRANSPORT_BLUETOOTH, true, true },
 | 
				
			||||||
	{ "Suunto", "Vyper", DC_TRANSPORT_SERIAL, false },
 | 
						{ "Suunto", "Vyper", DC_TRANSPORT_SERIAL, false, false },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDialog(parent),
 | 
					ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDialog(parent),
 | 
				
			||||||
| 
						 | 
					@ -1538,7 +1539,7 @@ void ConfigureDiveComputerDialog::dc_open()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const DiveComputerEntry selectedDiveComputer = supportedDiveComputers[ui.DiveComputerList->currentRow()];
 | 
						const DiveComputerEntry selectedDiveComputer = supportedDiveComputers[ui.DiveComputerList->currentRow()];
 | 
				
			||||||
	ui.updateFirmwareButton->setEnabled(selectedDiveComputer.fwUpgradePossible);
 | 
						ui.updateFirmwareButton->setEnabled(selectedDiveComputer.fwUpgradePossible);
 | 
				
			||||||
	ui.forceUpdateFirmware->setEnabled(supportedDiveComputers[selectedDiveComputerIndex].product == "OSTC 4");
 | 
						ui.forceUpdateFirmware->setEnabled(selectedDiveComputer.forcedFirmwareUpgradeSupported);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ui.progressBar->setFormat(tr("Connected to device"));
 | 
						ui.progressBar->setFormat(tr("Connected to device"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue