mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix per_cylinder_mean_depth calculation for CCR
This patch is bigger than necessary because I also renamed the get_cylinder_use() function to the much more accurate get_cylinder_idx_by_use(). If we have no gas changes (except for a possible explicit first gas), (which in the CCR case also means no bailout), this code will give you correct per cylinder depth and duration for oxygen and diluent and therefore create more reasonable gas consumption data for CCR dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ee7dd4307a
commit
3e5cb7e2aa
2 changed files with 17 additions and 9 deletions
2
dive.h
2
dive.h
|
@ -341,7 +341,7 @@ struct dive {
|
|||
int oxygen_cylinder_index, diluent_cylinder_index; // CCR dive cylinder indices
|
||||
};
|
||||
|
||||
extern int get_cylinder_use(struct dive *dive, enum cylinderuse cylinder_use_type);
|
||||
extern int get_cylinder_idx_by_use(struct dive *dive, enum cylinderuse cylinder_use_type);
|
||||
|
||||
/* when selectively copying dive information, which parts should be copied? */
|
||||
struct dive_components {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue