Skip to content
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

MavLink Connection restructuring #1009

Merged
merged 9 commits into from
Sep 1, 2014

Conversation

m4gr3d
Copy link
Member

@m4gr3d m4gr3d commented Aug 24, 2014

Rearchitecturing of the mavlink connection class structure:

  • The bulk of the class structure was moved to Core to allow reuse of logic in a platform agnostic way.
  • Introduced a Logger interface that allows logging in a platform agnostic way. Each platform must implement a provides its own Logger implementation (i.e: org.droidplanner.android.utils.AndroidLogger is the logger implementation for the Android platform).
  • Previous code had multiple concurrency issues. The new architecture fixes those issues:
    • Each connection task gets its own thread. One thread for Connecting & Receiving, one thread for Sending messages, and one thread for Logging. The threads communicates with each other, and the main thread using elements of the `java.util.concurrent' library.
    • Along throughput improvement, the new thread structure should fix the saveToLog bug.

m4gr3d added 5 commits August 23, 2014 22:24
Several core utilities not dependant on android were moved to 'Core'.
The restructuring should also fix a persistently annoying 'save to log' bug, which i think might have been the result of a race condition.
…into fix_savetolog_bug

Conflicts:
	Android/src/org/droidplanner/android/maps/providers/google_map/GoogleMapFragment.java
@m4gr3d
Copy link
Member Author

m4gr3d commented Aug 24, 2014

@arthurbenemann I'm heading out now to test the new changes in the field. I'll mostly focus on testing the usb type connection.
Since you have a bluetooth adapter, could you test the bluetooth type connection.

Once i get back, i'll test tcp, and udp via sitl. Although, if you have some time, feel free to test those as well.

@arthurbenemann
Copy link
Member

@ne0fhyk I'll test the UDP and BT monday when I'm back at the office. I'm not sure if someone is still using TCP (2% according to analytics).

@m4gr3d
Copy link
Member Author

m4gr3d commented Aug 25, 2014

@arthurbenemann usb connection working perfectly with the quad. Was unable to test with the plane unfortunately, rx receiver malfunction. I'll be ordering another one to replace the broken one.

No save to log crashes occurred during the whole testing/flying time!

m4gr3d added 2 commits August 27, 2014 19:14
…into fix_savetolog_bug

Conflicts:
	Android/src/org/droidplanner/android/fragments/DroneMap.java
@arthurbenemann
Copy link
Member

Looks good on Bt as well. I'm merging this for the next release.

arthurbenemann added a commit that referenced this pull request Sep 1, 2014
MavLink Connection restructuring
@arthurbenemann arthurbenemann merged commit e383a88 into DroidPlanner:master Sep 1, 2014
@m4gr3d m4gr3d deleted the fix_savetolog_bug branch September 1, 2014 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants