diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-13 21:44:18 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-13 21:45:24 +0900 |
commit | aa76d3592361ec7b07a8fc15fd466bcd392629ec (patch) | |
tree | 6f3955d496d01db10913b5cfdd14cd11be4e8cbb /planner.c | |
parent | 25e432e1d16efaaf0db3112222e7e3716c8e6304 (diff) | |
download | subsurface-aa76d3592361ec7b07a8fc15fd466bcd392629ec.tar.gz |
Instead of a "Cylinder for planning" use a default cylinder
Right now hardcoded to AL80. This way in the future we'll have a volume of
gas that's available. And this makes much more sense then a random string
in the description field.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -168,6 +168,13 @@ static int time_at_last_depth(struct dive *dive, int o2, int he, unsigned int ne return wait; } +void fill_default_cylinder(cylinder_t *cyl) +{ + cyl->type.description = strdup("AL80"); + cyl->type.size.mliter = 11097; + cyl->type.workingpressure.mbar = 206843; +} + int add_gas(struct dive *dive, int o2, int he) { int i; @@ -185,11 +192,10 @@ int add_gas(struct dive *dive, int o2, int he) if (i == MAX_CYLINDERS) { return -1; } + /* let's make it our default cylinder (right now hardcoded as AL80) */ + fill_default_cylinder(cyl); mix->o2.permille = o2; mix->he.permille = he; - /* since air is stored as 0/0 we need to set a name or an air cylinder - * would be seen as unset (by cylinder_nodata()) */ - cyl->type.description = strdup(translate("gettextFromC","Cylinder for planning")); return i; } |