carp-dk / carp-dk/flutter-plugins

[movesense_plus 1.2.0] Better handling connection error to connected device

Open
#1,286 0 comments 0 reactions 1 assignee Claimed by @bardram View on GitHub
bugfix improvement movesense_plus
Dominant language
Dart
Stars
608
Forks
735
Avg merge
1m
Merged PRs (30d)
3

Description

If you call connect to a `MovesenseDevice` twice to the same MAC address, you get this error:

```
I/flutter ( 6922): MovesenseDevice - Setting device '0C:8C:DC:1B:23:BF' as DeviceConnectionStatus.connecting
[log] Device connection error, address: 0C:8C:DC:1B:23:BF
I/flutter ( 6922): case onConnectionError. args: {error: Already connected to 0C:8C:DC:1B:23:BF, address: 0C:8C:DC:1B:23:BF}
I/flutter ( 6922): MovesenseDevice - Setting device '0C:8C:DC:1B:23:BF' as DeviceConnectionStatus.error
```

This sets the status of the device to `error`. But this isn't valid - you're still connected to the same device, and the status should remain `connected`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.