-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: pass raw bytes from native, parse using dart-opendroneid #21
Feature: pass raw bytes from native, parse using dart-opendroneid #21
Conversation
ada49b6
to
d825157
Compare
alter pigeon schema, rename MessagePack to Container DT-2604
5f74ecd
to
2283f42
Compare
Update: I tried scanning for data from all sources including simulated Wi-FI scan using ESP and achieved the same results as with the original version. Parsing of all message types including Waiting for release of dart-odid. |
Pls don't forget to assign reviewers, this was the PRs gets easily missed. |
dart_opendroneid is released: https://pub.dev/packages/dart_opendroneid/versions/0.1.0 |
2283f42
to
2288dd1
Compare
I used the released version of dart_opendroneid. But since PR1 was not resolved yet, |
04a62f9
to
d122320
Compare
d122320
to
cdacbaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave some comments on very minor issues, but I'll let you decide, since I don't have any real objections that would prevent merging.
Also do you think that maybe we could move some of the conversion and comparison code from compare_extensions.dart
and conversions.dart
to dart-opendroneid
?
android/src/main/kotlin/cz/dronetag/flutter_opendroneid/scanner/ODIDScanner.kt
Outdated
Show resolved
Hide resolved
android/src/main/kotlin/cz/dronetag/flutter_opendroneid/scanner/ODIDScanner.kt
Outdated
Show resolved
Hide resolved
a67aef2
to
1bf8e66
Compare
I used the getters in |
ac9dbf0
to
790ff7d
Compare
use getters in message container, add comments DT-2604
790ff7d
to
cb59744
Compare
Yeah, this will be ultimately resolved by also joining the structures that are used by the upcoming 'DRI Receiver' product. We don't have to resolve it right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Tested on my iPhone X, data seems also ok, but more thorough testing will be required in the future.
We will follow up with the structures for the metadata (the new container class you've created). There is an opportunity to use unified structures, as 'DRI Receiver' and potentially mobile app could use them too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this conversions could be a part of dart_opendroneid in the future.
# [0.14.0](v0.13.0...v0.14.0) (2023-09-12) ### Bug Fixes * update container with source of current message update ([c477388](c477388)) ### Features * add conversions of message values to strings ([7b43b50](7b43b50)) * put back duplicate messages filtering ([f1d1001](f1d1001)) * remove message parsing, use dart-odid ([c3dda27](c3dda27)) * shorted BLE advertisements to max 31 bytes ([8da4ea2](8da4ea2)) * Use dart-opendroneid for parsing & pass raw bytes from native (DT-2604) ([#21](#21)) ([87f5481](87f5481))
Remove parsing logic from native parts of the app, remove all models and enums representing messages and values in them. Rename
MessagePack
toMessageContainer
to avoid clash with dart-opendroneid'sMessagePack
.Add
ODIDPayload
class that is sent from native to dart. It contains raw data and metadata such as source and mac address. In dart code, parse the data usingdart-opendroneid
into messages and save them toMessageContainer
.To test this,
edit path in.pubspec.yaml
to point to your cloneddart-opendroneid
repositoryClone DroneScanner branch use-updated-odid and run it with this version of
flutter-opendroneid
.TODO
MessagePacks
, make sure they transform toMessageContainer
correctly - error found in Dart-opendroneidMessagePack
parsing - PR1.