Skip to content

Ble support for iOS - #5

Draft
Ben1980 wants to merge 68 commits into
DiveNote:developfrom
Ben1980:ble-support
Draft

Ble support for iOS#5
Ben1980 wants to merge 68 commits into
DiveNote:developfrom
Ben1980:ble-support

Conversation

@Ben1980

@Ben1980 Ben1980 commented Feb 28, 2024

Copy link
Copy Markdown

No description provided.

Comment thread lib/framework/dive_computer_isolate.dart
@Sese-Schneider Sese-Schneider linked an issue Mar 11, 2024 that may be closed by this pull request
conkleon added a commit to conkleon/flutter_divecomputer that referenced this pull request Aug 27, 2026
…al review

- ackOutbound(seq, status): ack the exact sequence written, never the
  current writeSeq; add a re-entrancy guard so the 4ms mailbox timer
  cannot start a second concurrent GATT write (DiveNote#1)
- notification listener reads the _bridge FIELD and checks isClosed,
  preventing a push into memory freed by teardown/dispose (DiveNote#2)
- download(): group allocate/attach/send in a try that disposes the
  bridge and rethrows, so an early failure can neither leak the bridge
  nor hang forever awaiting a _BleBridgeReleased that will never come (DiveNote#3)
- guard _bleBridgeReleased.complete() against StateError wedging the
  ReceivePort listener (DiveNote#5)
- enableDebugLogging() now drives Logger('BleBridge') on the background
  isolate and Logger('BleTransport') on the main isolate, both forwarded
  to developer.log via a shared helper (DiveNote#6)
- scan(): drop results after close, clear the global onScanResult handler
  and _seen on cancel (DiveNote#7)
- connect(): disconnect the GATT link on any post-connect failure before
  the retry loop opens a new one (#11)
- export ble_profile.dart / ble_scan_result.dart from the barrel and drop
  the example's deep import (#16)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_send is somehow destroying additional field in Computer

2 participants