Skip to content

Commit

Permalink
core: add missing properties to the dive merge
Browse files Browse the repository at this point in the history
In a sign how few people use these additional properties AND use multiple
dive computers, this took a couple of years to get noticed... but yes, we
do need to merge those properties as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  • Loading branch information
dirkhh committed Jun 8, 2022
1 parent cf216ec commit 19b221d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,4 @@
- core: merge all properties in a dive, including current, waveheight, etc
- core: prevent crash when merging dives without cylinders (as we might get when importing from divelogs.de)
- core: work around bug in TecDiving dive computer reporting spurious 0 deg C water temperature in first sample
- core: correctly parse DC_FIELD_SALINITY response; fixes incorrect water type with some dive computers, including the Mares Smart
Expand All @@ -6,6 +7,9 @@
- dive computer support
- Garmin: correctly deal with short format filenames
- Garmin: correctly parse dive mode
- Add support for the Seac Screen and Action
- Add support for the Cressi Michelangelo


---
* Always add new entries at the very top of this file above other existing entries and this note.
Expand Down
4 changes: 4 additions & 0 deletions core/dive.c
Expand Up @@ -2621,6 +2621,10 @@ struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset,
MERGE_TXT(res, a, b, suit, ", ");
MERGE_MAX(res, a, b, number);
MERGE_NONZERO(res, a, b, visibility);
MERGE_NONZERO(res, a, b, wavesize);
MERGE_NONZERO(res, a, b, current);
MERGE_NONZERO(res, a, b, surge);
MERGE_NONZERO(res, a, b, chill);
copy_pictures(a->pictures.nr ? &a->pictures : &b->pictures, &res->pictures);
taglist_merge(&res->tag_list, a->tag_list, b->tag_list);
/* if we get dives without any gas / cylinder information in an import, make sure
Expand Down

0 comments on commit 19b221d

Please sign in to comment.