diff options
author | Patrick Valsecchi <patrick@thus.ch> | 2013-10-04 07:57:48 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-04 09:16:39 -0700 |
commit | c28fe00bfe7b0ed747050afc97812a56ccc8a291 (patch) | |
tree | decfc381de4823d5744b8b978c29c732e0ea2c75 /profile.c | |
parent | 6ae6c768f30d2d377292f0ea3ff050dfd7cb52ca (diff) | |
download | subsurface-c28fe00bfe7b0ed747050afc97812a56ccc8a291.tar.gz |
Added configuration options for vertical speed units.
Some people (free divers) are loving ft/s or m/s units for vertical speeds.
Now they can choose between /min or /s in the configuration (only Qt UI).
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1213,7 +1213,7 @@ static void plot_string(struct plot_data *entry, char *buf, int bufsize, int depth, int pressure, int temp, gboolean has_ndl) { int pressurevalue, mod, ead, end, eadd; - const char *depth_unit, *pressure_unit, *temp_unit; + const char *depth_unit, *pressure_unit, *temp_unit, *vertical_speed_unit; char *buf2 = malloc(bufsize); double depthvalue, tempvalue, speedvalue; @@ -1236,12 +1236,12 @@ static void plot_string(struct plot_data *entry, char *buf, int bufsize, snprintf(buf, bufsize, _("%s\nT:%.1f %s"), buf2, tempvalue, temp_unit); } - speedvalue = get_depth_units(abs(entry->speed), NULL, &depth_unit)*60; + speedvalue = get_vertical_speed_units(abs(entry->speed), NULL, &vertical_speed_unit); memcpy(buf2, buf, bufsize); /* Ascending speeds are positive, descending are negative */ if (entry->speed > 0) speedvalue *= -1; - snprintf(buf, bufsize, _("%s\nV:%.1f %s/min"), buf2, speedvalue, depth_unit); + snprintf(buf, bufsize, _("%s\nV:%.2f %s"), buf2, speedvalue, vertical_speed_unit); if (entry->ceiling) { depthvalue = get_depth_units(entry->ceiling, NULL, &depth_unit); |