Changeset 09b5f9b in subsurface


Ignore:
Timestamp:
Mar 29, 2017, 5:00:16 AM (2 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
34a42d7
Parents:
3b9c32a0
git-author:
Dirk Hohndel <dirk@…> (03/29/17 04:59:31)
git-committer:
Dirk Hohndel <dirk@…> (03/29/17 05:00:16)
Message:

Accept 0 as valid endpressure for Uwatec devices

Instead of delivering the actual start and end pressure, memomouse
gives you a start pressure that matches the delta between actual
start and end pressure, and an end pressure of zero. Who the heck
knows why it does that, but the information is better than nothing,
so we should accept it.

Fixes #286

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/libdivecomputer.c

    rbcad5dd r09b5f9b  
    206206
    207207                        // this new API also gives us the beginning and end pressure for the tank
    208                         if (!IS_FP_SAME(tank.beginpressure, 0.0) && !IS_FP_SAME(tank.endpressure, 0.0)) {
     208                        // normally 0 is not a valid pressure, but for some Uwatec dive computers we
     209                        // don't get the actual start and end pressure, but instead a start pressure
     210                        // that matches the consumption and an end pressure of always 0
     211                        if (!IS_FP_SAME(tank.beginpressure, 0.0) && (same_string(devdata->vendor, "Uwatec") || !IS_FP_SAME(tank.endpressure, 0.0))) {
    209212                                dive->cylinder[i].start.mbar = lrint(tank.beginpressure * 1000);
    210213                                dive->cylinder[i].end.mbar = lrint(tank.endpressure * 1000);
Note: See TracChangeset for help on using the changeset viewer.