{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":78665021,"defaultBranch":"master","name":"subsurface-for-dirk","ownerLogin":"torvalds","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2017-01-11T18:03:01.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1024025?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1724820946.0","currentOid":""},"activityList":{"items":[{"before":"9a21d51f30d4687298678bd5d069e53d3b33b0c3","after":"131cb23823d34c34c5e3b8c81aca47c794ce559d","ref":"refs/heads/fix-dive-merge","pushedAt":"2024-08-28T08:00:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"torvalds","name":"Linus Torvalds","path":"/torvalds","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1024025?s=80&v=4"},"commit":{"message":"Fix location in result of dive merging\n\nThis is the minimal fix to actually include the resulting location in\nthe merged dive. I'm not sure what the background was to setting the\ndive location only in the \"merge_result\" variable, and not in the actual\nresult dive itself.\n\nBerthold says that the whole site handling may be broken:\n\n \"From a quick glance, the code in dive_table::merge_dives looks\n fundamentally broken, because it may overwrite site->location outside\n of the undo system. I.e. this will not be undone.\"\n\nbut the \"this will not be undone\" is about the site location setting,\nand is separate and independent of the dive->dive_set setting.\n\nPresumably we would need to make a copy of the site for the undo\nfunctionality. That will be for somebody else to worry about, this at\nleast fixes the resulting location in the dive itsels.\n\nSigned-off-by: Linus Torvalds ","shortMessageHtmlLink":"Fix location in result of dive merging"}},{"before":null,"after":"9a21d51f30d4687298678bd5d069e53d3b33b0c3","ref":"refs/heads/fix-dive-merge","pushedAt":"2024-08-28T04:55:46.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"torvalds","name":"Linus Torvalds","path":"/torvalds","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1024025?s=80&v=4"},"commit":{"message":"Fix sample times in dive merging\n\nCommit c27314d60 (\"core: replace add_sample() by append_sample()\") broke\nthe dive computer interleaving when merging two dives: the sample\nmerging (done by \"merge_samples()\") no longer took the offset between\nthe two merged dives into account, and instead just blindly copied the\nsamples from the second dive computer with no time offset.\n\nThe end result was a completely broken profile.\n\nThis adds back the sample offset. It also takes the offset not from the\ndifference in time of the two dives, but the difference in time of the\ndive computers. That way we're not mixing up different times from\ndifferent sources that aren't necessarily in sync (the time *difference*\nis hopefully the same, but still..).\n\nThe dive merging still messes up the dive location. That's some other bug.\n\nSigned-off-by: Linus Torvalds ","shortMessageHtmlLink":"Fix sample times in dive merging"}},{"before":null,"after":"425b0e93d7b4adc09be98bfc97c9ddc39c9662d9","ref":"refs/heads/FIT-duration-fix","pushedAt":"2024-08-26T05:01:08.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"torvalds","name":"Linus Torvalds","path":"/torvalds","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1024025?s=80&v=4"},"commit":{"message":"Fix Suunto FIT file import dive duration mis-calculation\n\nThe Suunto FIT files end up creating a sample every second, but a lot of\nthose samples with no depth information, marked as \"depth.mm\" being negative.\n\nThat doesn't end up being a problem for subsurface, _except_ that it\nreally confuses our \"dc_fixup_duration()\" logic, and the dive duration\nends up being completely nonsensical (generally roughly by a factor of\nfive: every tenth sample has a depth, and we only count samples that\n\"begin or end under water\" as being relevant for the dive duration, so\ntwo out of the ten samples will count towards the dive time).\n\nSaving the dive will then not save these invalid depths, so saving and\nreloading the dive ends up fixing the dive duration calculation.\n\nThe fix is trivial - we just ignore samples with negative depth in\ndc_fixup_duration().\n\nThe FIT file parser should probably be taught to not even bother sending\nempty samples to subsurface, but that's a separate cleanup. This fixes\nthe actual bad behavior.\n\nSigned-off-by: Linus Torvalds ","shortMessageHtmlLink":"Fix Suunto FIT file import dive duration mis-calculation"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEpjWgQQA","startCursor":null,"endCursor":null}},"title":"Activity ยท torvalds/subsurface-for-dirk"}