mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
344e517956
commit
88d806f218
1 changed files with 3 additions and 1 deletions
|
@ -79,8 +79,10 @@ void get_gas_string(const struct gasmix *gasmix, char *text, int len)
|
||||||
{
|
{
|
||||||
if (gasmix_is_air(gasmix))
|
if (gasmix_is_air(gasmix))
|
||||||
snprintf(text, len, "%s", translate("gettextFromC", "air"));
|
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);
|
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
|
else
|
||||||
snprintf(text, len, "(%d/%d)", (get_o2(gasmix) + 5) / 10, (get_he(gasmix) + 5) / 10);
|
snprintf(text, len, "(%d/%d)", (get_o2(gasmix) + 5) / 10, (get_he(gasmix) + 5) / 10);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue