]> git.tdb.fi Git - ext/subsurface.git/blobdiff - profile.c
Add radio buttons for temperature and volume
[ext/subsurface.git] / profile.c
index 5cd88885ab9a7b52a86f0ad76c1b34773ae6147d..705d90cd652e15a59c47fba9c34e07e30d6a46dc 100644 (file)
--- a/profile.c
+++ b/profile.c
@@ -357,13 +357,13 @@ static void plot_cylinder_pressure_text(struct dive *dive, cairo_t *cr,
                        unit = "pascal";
                        break;
                case BAR:
-                       start = startp.mbar / 1000;
-                       end = endp.mbar / 1000;
+                       start = (startp.mbar + 500) / 1000;
+                       end = (endp.mbar + 500) / 1000;
                        unit = "bar";
                        break;
                case PSI:
-                       start = startp.mbar / 68.95;
-                       end = endp.mbar / 68.95;
+                       start = to_PSI(startp);
+                       end = to_PSI(endp);
                        unit = "psi";
                        break;
                }