Skip to content

1.21.0

Choose a tag to compare

@latishab latishab released this 05 Nov 13:25
68afd51

Groundwork for dive computers on more transports than Bluetooth LE: open a device on any iostream, download over a session with a commit-acknowledge fingerprint, identify computers the same way on every transport, and (macOS) custom, tapped and recorded streams. The iOS CBPeripheral download keeps its contract. Full details in CHANGELOG.md.

Added

  • DiveComputerSession (open on an iostream you opened, or adopt/adoptBLE an open device) and DiveLogRetriever.retrieveDiveLogs(session:...), which completes with a DiveDownloadResult and a FingerprintCommit you acknowledge once the dives are stored. Session downloads follow the same rejected-dive rule as BLE: a dive the parser rejects holds the fingerprint once and is skipped as unreadable the second time. BLE-adopted sessions share the manager's close deferral (#85)
  • DiveComputerSessionLease: one open session at a time, BLE or cable (#85)
  • DiveComputerIdentity, DiveComputerLocator, DCTransport and DeviceCatalog (every libdivecomputer descriptor at runtime, with canonical names); fingerprints and rejected dives can be keyed by identity, with migrateLegacyKeys / DeviceStorage.migrateFingerprintKeys() to move older records over in place (#87)
  • macOS: DCCustomStream, TapStream (cancellable within 100 ms), DCRecording (.dcrec) and ScriptedStream replay; PacketEvent.channel names the link a packet crossed (#86)
  • LibDCBridge: open_device_on_iostream, find_descriptor_by_name_transport, libdc_set_cancel, libdc_close_device_data, libdc_cable_transports() and libdc_has_custom_baud() (#82, #84, #85)
  • macOS: libdivecomputer builds with IOSSIOSPEED, so non-standard serial rates (Sporasub SP2 460800, Cochran EMC 850000) work, plus serial latency and monotonic timeouts (#82)
  • DC Tester Mac: a sandboxed macOS probe for serial, USB-HID, raw USB, BLE and Garmin volume access, for the cable go/no-go matrix in Docs/MAC_SANDBOX_PROBE.md (#80)
  • CI: macOS swift test, generic iOS/macOS builds, iOS Simulator tests and the DC Tester build on every PR (#83)

Changed

  • DeviceConfiguration.DeviceFamily has a case for every libdivecomputer family (47, was 17). Existing cases and raw values are unchanged, but an exhaustive switch without default no longer compiles (#87)
  • open_ble_device opens through the shared open helper, with the same 5 attempts 3 s apart (#84)
  • The CBPeripheral retrieveDiveLogs overload runs on the same download core as sessions; its behaviour is unchanged (#85)

Fixed

  • Every downloaded dive is in viewModel.dives when completion runs; the last one used to land a main-queue turn later (#85)
  • DiveDataViewModel.progress no longer slips back to .inProgress after .completed, .noNewDives, .emptyRead, .cancelled or .failed, and a download's progress reset no longer clears lastHandshakeAcknowledged (#85)
  • DeviceFingerprintStorage serializes its writes; DeviceStorage drops an unreadable record on its own instead of emptying the list, and reconcileUUID only re-keys BLE records (#87)
  • Suunto Nautic/Ocean: a dive's start comes from dc_datetime_mktime, so it stays the same instant once the parser reports each dive's UTC offset. No change at this release's libdivecomputer pin (#106, @aleskiontherun)
  • find_descriptor_by_name returns DC_STATUS_INVALIDARGS for a NULL argument instead of crashing (#84)

libdivecomputer is unchanged (still 1b201bb). The per-dive UTC offset (deepsealabs/libdivecomputer#19) comes in a later release, after a watch test.