mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Connect prefs.descrate to drop_stone_mode points
This enables so we can change the decent speed for drop like a stone mode. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									f2afddf4ad
								
							
						
					
					
						commit
						c7231adde1
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -648,7 +648,7 @@ void DivePlannerPointsModel::setDropStoneMode(bool value) | ||||||
| 		beginInsertRows(QModelIndex(), 0, 0); | 		beginInsertRows(QModelIndex(), 0, 0); | ||||||
| 		/* Copy the first current point */ | 		/* Copy the first current point */ | ||||||
| 		divedatapoint p = divepoints.at(0); | 		divedatapoint p = divepoints.at(0); | ||||||
| 		p.time = p.depth / 300; | 		p.time = p.depth / prefs.descrate; | ||||||
| 		divepoints.push_front(p); | 		divepoints.push_front(p); | ||||||
| 		endInsertRows(); | 		endInsertRows(); | ||||||
| 	} | 	} | ||||||
|  | @ -934,9 +934,8 @@ void DivePlannerPointsModel::createTemporaryPlan() | ||||||
| 		lastIndex = i; | 		lastIndex = i; | ||||||
| 		if (i == 0 && drop_stone_mode) { | 		if (i == 0 && drop_stone_mode) { | ||||||
| 			/* Okay, we add a fist segment where we go down to depth */ | 			/* Okay, we add a fist segment where we go down to depth */ | ||||||
| 			/* FIXME: make this configurable, now hard-coded to 18 m/s */ | 			plan_add_segment(&diveplan, p.depth / prefs.descrate, p.depth, p.gasmix, p.po2, false); | ||||||
| 			plan_add_segment(&diveplan, p.depth / 300, p.depth, p.gasmix, p.po2, false); | 			deltaT -= p.depth / prefs.descrate; | ||||||
| 			deltaT -= p.depth / 300; |  | ||||||
| 		} | 		} | ||||||
| 		if (p.entered) | 		if (p.entered) | ||||||
| 			plan_add_segment(&diveplan, deltaT, p.depth, p.gasmix, p.po2, true); | 			plan_add_segment(&diveplan, deltaT, p.depth, p.gasmix, p.po2, true); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue