From 7f3efbdc98deeb4e4bcd481335761b6439b9552c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 25 Jun 2014 21:36:30 +0800 Subject: Make gas mod be reasonable for users of imperial units as well Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 2 +- qt-ui/models.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 57438eb39..0708b6aef 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -694,7 +694,7 @@ bool DivePlannerPointsModel::addGas(struct gasmix mix) * The user should be able to change this depth manually. */ pressure_t modpO2; modpO2.mbar = prefs.decopo2; - cyl->depth = gas_mod(&mix, modpO2, 3000); + cyl->depth = gas_mod(&mix, modpO2, M_OR_FT(3,10)); CylindersModel::instance()->setDive(stagingDive); return true; diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index a5a1f5bff..823619f64 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -251,7 +251,7 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in cyl->gasmix.o2 = string_to_fraction(vString.toUtf8().data()); pressure_t modpO2; modpO2.mbar = prefs.decopo2; - cyl->depth = gas_mod(&cyl->gasmix, modpO2, 3000); + cyl->depth = gas_mod(&cyl->gasmix, modpO2, M_OR_FT(3,10)); changed = true; } break; -- cgit v1.2.3-70-g09d2