aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/output.c b/src/output.c
index 52b45dd..5997f31 100644
--- a/src/output.c
+++ b/src/output.c
@@ -69,8 +69,8 @@ void print_planline(wchar_t sign, double depth, double time, double runtime, con
static gas_t last_gas;
- const int depth_m = round(bar_to_msw(gauge_depth(depth)));
- const int ead_m = round(bar_to_msw(max(0, gauge_depth(ead(depth, gas)))));
+ const int depth_x = round(bar_to_xsw(gauge_depth(depth)));
+ const int ead_x = round(bar_to_xsw(max(0, gauge_depth(ead(depth, gas)))));
wchar_t swi = L' ';
@@ -86,14 +86,15 @@ void print_planline(wchar_t sign, double depth, double time, double runtime, con
/* only print ead and pO2 on stops */
if (sign == LVL) {
- snprintf(eadbuf, 4, "%3i", ead_m);
+ snprintf(eadbuf, 4, "%3i", ead_x);
snprintf(pO2buf, 5, "%4.2f", ppO2(depth, gas));
} else {
snprintf(eadbuf, 4, "%3s", "-");
snprintf(pO2buf, 5, "%4s", "-");
}
- wprintf(L" %lc %4im %8s %-7s %lc %-9s %s %s\n", sign, depth_m, timbuf, runbuf, swi, gasbuf, pO2buf, eadbuf);
+ wprintf(L" %lc %4i%s %8s %-7s %lc %-9s %s %s\n", sign, depth_x, (UNITS == METRIC) ? "m" : "ft", timbuf,
+ runbuf, swi, gasbuf, pO2buf, eadbuf);
}
void print_planfoot(const decostate_t *ds)