Gas denisity display improvement

This combines the display with EADD since this is the same
value with a different unit. And show it for air dives as
well.

Suggested by Jan Mulder & Anton Lundin

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-05-16 21:24:39 +02:00 committed by Dirk Hohndel
parent 98a65b7157
commit 05a7fe1d40

View file

@ -1333,15 +1333,14 @@ static void plot_string(struct plot_info *pi, struct plot_data *entry, struct me
switch (pi->dive_type) {
case NITROX:
ead = lrint(get_depth_units(lrint(entry->ead), NULL, &depth_unit));
put_format(b, translate("gettextFromC", "EAD: %d%s\nEADD: %d%s\n"), ead, depth_unit, eadd, depth_unit);
put_format(b, translate("gettextFromC", "density: %.1fg/l\n"), entry->density);
put_format(b, translate("gettextFromC", "EAD: %d%s\nEADD: %d%s / %.1fg/\n"), ead, depth_unit, eadd, depth_unit, entry->density);
break;
case TRIMIX:
end = lrint(get_depth_units(lrint(entry->end), NULL, &depth_unit));
put_format(b, translate("gettextFromC", "END: %d%s\nEADD: %d%s\n"), end, depth_unit, eadd, depth_unit);
put_format(b, translate("gettextFromC", "density: %.1fg/l\n"), entry->density);
put_format(b, translate("gettextFromC", "END: %d%s\nEADD: %d%s / %.1fg/\n"), end, depth_unit, eadd, depth_unit, entry->density);
break;
case AIR:
put_format(b, translate("gettectFromC", "Density: %.1fg/\n"), entry->density);
case FREEDIVING:
/* nothing */
break;