From 88d806f2183480f227b21875ad4d9551d89b8b24 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Mon, 5 Jan 2015 20:09:30 +0100 Subject: Use correct name for oxygen When O2 is 100% we should use oxygen instead of EAN100. Signed-off-by: Joakim Bygdell Signed-off-by: Dirk Hohndel --- equipment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'equipment.c') 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); } -- cgit v1.2.3-70-g09d2