units: replace SURFACE_PRESSURE by 1_atm

Moreover, convert diveplan::surface_pressure from int to
pressure_t.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-09-09 13:55:37 +02:00 committed by bstoeger
parent ae81b42fe2
commit dd5def35f5
11 changed files with 56 additions and 64 deletions

View file

@ -410,7 +410,7 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
cyl.gasmix.he.permille = 1000 - get_o2(cyl.gasmix);
pressure_t modpO2;
if (d->dcs[0].divemode == PSCR)
modpO2.mbar = prefs.decopo2 + (1000 - get_o2(cyl.gasmix)) * SURFACE_PRESSURE *
modpO2.mbar = prefs.decopo2 + (1000 - get_o2(cyl.gasmix)) * (1_atm).mbar *
prefs.o2consumption / prefs.decosac / prefs.pscr_ratio;
else
modpO2.mbar = prefs.decopo2;