aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/opendeco-cli.c
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2023-01-04 12:58:59 +0100
committerGravatar Tim Segers <tsegers@pm.me>2023-01-07 15:24:51 +0100
commit70d7bb650ad46a4237afd27cfd595812eb040701 (patch)
tree88fa2889132c756ced9b86a87b8ea4e5d5204d47 /src/opendeco-cli.c
parent5737a0996df3b9f11d541cc45c7e32ae3b9a7aac (diff)
downloadopendeco-70d7bb650ad46a4237afd27cfd595812eb040701.tar.gz
Add support for imperial units
Implements: https://todo.sr.ht/~tsegers/opendeco/1
Diffstat (limited to 'src/opendeco-cli.c')
-rw-r--r--src/opendeco-cli.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opendeco-cli.c b/src/opendeco-cli.c
index 5f6b627..d8da388 100644
--- a/src/opendeco-cli.c
+++ b/src/opendeco-cli.c
@@ -26,6 +26,7 @@ static struct argp_option options[] = {
{"gas", 'g', "STRING", 0, "Set the bottom gas used during the dive, defaults to Air", 2 },
{"pressure", 'p', "NUMBER", 0, "Set the surface air pressure, defaults to 1.01325bar or 1atm", 3 },
{"rmv", 'r', "NUMBER", 0, "Set the RMV during the dive portion of the dive, defaults to 20", 4 },
+ {"imperial", 'i', 0, 0, "Use imperial units (fsw)", 5 },
{0, 0, 0, 0, "Deco options:", 0 },
{"gflow", 'L', "NUMBER", 0, "Set the gradient factor at the first stop, defaults to 30", 5 },
@@ -83,6 +84,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
case 'r':
arguments->RMV_DIVE = arg ? atof(arg) : -1;
break;
+ case 'i':
+ arguments->UNITS = IMPERIAL;
+ break;
case 'L':
arguments->gflow = arg ? atoi(arg) : -1;
break;