mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	configure OSTC/OSTC3: Bugfix depth parameter unit
The unit for the depth parameters ain't meters, its 0.1 meters. This caused the values stored to be out of range. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									ee0bdd9043
								
							
						
					
					
						commit
						77e1c2afa9
					
				
					 1 changed files with 12 additions and 12 deletions
				
			
		|  | @ -477,9 +477,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC3() | ||||||
| 	deviceDetails->alwaysShowppO2 = ui.alwaysShowppO2->isChecked(); | 	deviceDetails->alwaysShowppO2 = ui.alwaysShowppO2->isChecked(); | ||||||
| 	deviceDetails->tempSensorOffset = ui.tempSensorOffsetDoubleSpinBox->value() * 10; | 	deviceDetails->tempSensorOffset = ui.tempSensorOffsetDoubleSpinBox->value() * 10; | ||||||
| 	deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox->value(); | 	deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox->value(); | ||||||
| 	deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value(); | 	deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value() * 10; | ||||||
| 	deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value(); | 	deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value() * 10; | ||||||
| 	deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value(); | 	deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value() * 10; | ||||||
| 
 | 
 | ||||||
| 	//set gas values
 | 	//set gas values
 | ||||||
| 	gas gas1; | 	gas gas1; | ||||||
|  | @ -610,9 +610,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC() | ||||||
| 	deviceDetails->decoGasConsumption = ui.decoGasConsumption_3->value(); | 	deviceDetails->decoGasConsumption = ui.decoGasConsumption_3->value(); | ||||||
| 	deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator_3->isChecked(); | 	deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator_3->isChecked(); | ||||||
| 	deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox_3->value(); | 	deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox_3->value(); | ||||||
| 	deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value(); | 	deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value() * 10; | ||||||
| 	deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value(); | 	deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value() * 10; | ||||||
| 	deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value(); | 	deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value() * 10; | ||||||
| 
 | 
 | ||||||
| 	//set gas values
 | 	//set gas values
 | ||||||
| 	gas gas1; | 	gas gas1; | ||||||
|  | @ -861,9 +861,9 @@ void ConfigureDiveComputerDialog::reloadValuesOSTC3() | ||||||
| 	ui.alwaysShowppO2->setChecked(deviceDetails->alwaysShowppO2); | 	ui.alwaysShowppO2->setChecked(deviceDetails->alwaysShowppO2); | ||||||
| 	ui.tempSensorOffsetDoubleSpinBox->setValue((double)deviceDetails->tempSensorOffset / 10.0); | 	ui.tempSensorOffsetDoubleSpinBox->setValue((double)deviceDetails->tempSensorOffset / 10.0); | ||||||
| 	ui.safetyStopLengthSpinBox->setValue(deviceDetails->safetyStopLength); | 	ui.safetyStopLengthSpinBox->setValue(deviceDetails->safetyStopLength); | ||||||
| 	ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth); | 	ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth / 10.0); | ||||||
| 	ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth); | 	ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth / 10.0); | ||||||
| 	ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth); | 	ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth / 10.0); | ||||||
| 
 | 
 | ||||||
| 	//load gas 1 values
 | 	//load gas 1 values
 | ||||||
| 	ui.ostc3GasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen))); | 	ui.ostc3GasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen))); | ||||||
|  | @ -988,9 +988,9 @@ setNumberOfDives | ||||||
| 	ui.decoGasConsumption_3->setValue(deviceDetails->decoGasConsumption); | 	ui.decoGasConsumption_3->setValue(deviceDetails->decoGasConsumption); | ||||||
| 	ui.graphicalSpeedIndicator_3->setChecked(deviceDetails->graphicalSpeedIndicator); | 	ui.graphicalSpeedIndicator_3->setChecked(deviceDetails->graphicalSpeedIndicator); | ||||||
| 	ui.safetyStopLengthSpinBox_3->setValue(deviceDetails->safetyStopLength); | 	ui.safetyStopLengthSpinBox_3->setValue(deviceDetails->safetyStopLength); | ||||||
| 	ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth); | 	ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth / 10.0); | ||||||
| 	ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth); | 	ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth / 10.0); | ||||||
| 	ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth); | 	ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth / 10.0); | ||||||
| 
 | 
 | ||||||
| 	//load gas 1 values
 | 	//load gas 1 values
 | ||||||
| 	ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen))); | 	ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen))); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue