summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2015-01-05 20:09:30 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-05 13:30:19 -0800
commit88d806f2183480f227b21875ad4d9551d89b8b24 (patch)
tree8be131568cf98eb107e8402c83458e049bacb4ef /equipment.c
parent344e517956fdb0ce3e6cf6fd76bce9d5dbe21c4c (diff)
downloadsubsurface-88d806f2183480f227b21875ad4d9551d89b8b24.tar.gz
Use correct name for oxygen
When O2 is 100% we should use oxygen instead of EAN100. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'equipment.c')
-rw-r--r--equipment.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/equipment.c b/equipment.c
index 3725b505d..aebac5120 100644
--- a/equipment.c
+++ b/equipment.c
@@ -79,8 +79,10 @@ void get_gas_string(const struct gasmix *gasmix, char *text, int len)
{
if (gasmix_is_air(gasmix))
snprintf(text, len, "%s", translate("gettextFromC", "air"));
- else if (get_he(gasmix) == 0)
+ else if (get_he(gasmix) == 0 && get_o2(gasmix) < 1000)
snprintf(text, len, translate("gettextFromC", "EAN%d"), (get_o2(gasmix) + 5) / 10);
+ else if (get_he(gasmix) == 0 && get_o2(gasmix) == 1000)
+ snprintf(text, len, "%s", translate("gettextFromC", "oxygen"));
else
snprintf(text, len, "(%d/%d)", (get_o2(gasmix) + 5) / 10, (get_he(gasmix) + 5) / 10);
}