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

@ -34,8 +34,8 @@ void TestAirPressure::testReadAirPressure()
void TestAirPressure::testConvertAltitudetoAirPressure()
{
QCOMPARE(891,altitude_to_pressure(1000000)); // 1000 m altitude in mm
QCOMPARE(1013,altitude_to_pressure(0)); // sea level
QCOMPARE(891, altitude_to_pressure(1000000).mbar); // 1000 m altitude in mm
QCOMPARE(1013, altitude_to_pressure(0).mbar); // sea level
}
void TestAirPressure::testWriteReadBackAirPressure()