diff options
author | Salvador Cuñat <salvador.cunat@gmail.com> | 2017-03-17 23:10:36 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-18 08:33:31 -0700 |
commit | e2fe196d82f7fb67c960cebbcd8f7dd0245f33c0 (patch) | |
tree | c152eb8f0ee0d4b52f3bf7532b3e6e1bc7275455 /smtk-import | |
parent | 5c757d5c387f47482556eab6292818b7eba27ce8 (diff) | |
download | subsurface-e2fe196d82f7fb67c960cebbcd8f7dd0245f33c0.tar.gz |
smtk-import fix is_same_cylinder()
Add return value to the gasmix condition, and fix the rest of the
conditions.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Diffstat (limited to 'smtk-import')
-rw-r--r-- | smtk-import/smartrak.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/smtk-import/smartrak.c b/smtk-import/smartrak.c index a525409b6..c7fadacf5 100644 --- a/smtk-import/smartrak.c +++ b/smtk-import/smartrak.c @@ -424,14 +424,15 @@ static void smtk_build_tank_info(MdbHandle *mdb, cylinder_t *tank, char *idx) bool is_same_cylinder(cylinder_t *cyl_a, cylinder_t *cyl_b) { // different gasmixes (non zero) - if (gasmix_distance(&cyl_a->gasmix, &cyl_b->gasmix) != 0 && + if (cyl_a->gasmix.o2.permille - cyl_b->gasmix.o2.permille != 0 && cyl_a->gasmix.o2.permille != 0 && cyl_b->gasmix.o2.permille != 0) + return false; // different start pressures (possible error 0.1 bar) - if (!abs(cyl_a->start.mbar - cyl_b->start.mbar) <= 100) + if (!(abs(cyl_a->start.mbar - cyl_b->start.mbar) <= 100)) return false; // different end pressures (possible error 0.1 bar) - if (!abs(cyl_a->end.mbar - cyl_b->end.mbar) <= 100) + if (!(abs(cyl_a->end.mbar - cyl_b->end.mbar) <= 100)) return false; // different names (none of them null) if (!same_string(cyl_a->type.description, "---") && |