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

Receiving PX4 parameters supported #375

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
ea124d8
DRON-19 (Video pipeline improvement)
Jan 21, 2016
8719751
Merge remote-tracking branch 'origin' into video_pipeline_improvements
Feb 1, 2016
bbc6dc7
Merge remote-tracking branch 'origin' into video_pipeline_improvements
Feb 3, 2016
503ea26
Merge remote-tracking branch 'origin' into video_pipeline_improvements
Feb 5, 2016
5219f53
Merge remote-tracking branch 'origin' into video_pipeline_improvements
Feb 5, 2016
ab4244c
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 5, 2016
5041c76
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 5, 2016
15733bf
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 5, 2016
24aadcb
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 5, 2016
0f98712
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 7, 2016
ddd0f0b
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 7, 2016
8db22e5
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 7, 2016
8e3e97f
First commit to refactor link state callbacks
Feb 9, 2016
659f356
Updated test with new API. Reformatted other tests
Feb 9, 2016
892838b
Merge pull request #54 from 3drobotics/release-1.5.1
Feb 9, 2016
c41ff1b
Created helper method for failed connection status. Added javadocs
Feb 9, 2016
48fae6a
Updated per comments
Feb 10, 2016
4f0cd3f
Ensure backwards compatibility for onConnectionFailed
Feb 10, 2016
369ecb6
Merge pull request #56 from 3drobotics/release-1.5.1
m4gr3d Feb 11, 2016
b741ee8
Merge branch 'develop' of github.com:dronekit/dronekit-android into d…
m4gr3d Feb 11, 2016
1e9d34d
Merge branches 'develop' and 'refactor_link_callbacks' of https://git…
Feb 11, 2016
f6ede4d
Fixed mavlink dependency
Feb 11, 2016
5a7d279
Updated per comments
Feb 11, 2016
1498074
Removed disconnect on HEARTBEAT_TIMEOUT
Feb 11, 2016
2f163a1
Merge pull request #58 from 3drobotics/fix_mavlink_dependency
m4gr3d Feb 11, 2016
bee9cbf
Merge branches 'develop' and 'refactor_link_callbacks' of https://git…
Feb 11, 2016
0644d3f
Updated javadocs
Feb 11, 2016
51f0eae
Merge pull request #52 from 3drobotics/refactor_link_callbacks
m4gr3d Feb 12, 2016
ed23535
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 7, 2016
85ecf82
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 12, 2016
2459263
Updated services to support in app wifi
Feb 12, 2016
cc69600
Receiving PX4 parameters supported
KiBa1215 Feb 16, 2016
cd2b632
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 12, 2016
ec0822f
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 18, 2016
91888bf
Add the option to start the camera trigger after the first survey way…
m4gr3d Feb 19, 2016
be6d544
Bump the version
m4gr3d Feb 19, 2016
9922052
Fix bug preventing building the survey mission item when disconnect f…
m4gr3d Feb 22, 2016
bd1a745
Updated per comments
Feb 22, 2016
914e656
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 18, 2016
4f22695
Merge branch 'video_pipeline_improvements' of https://github.com/3dro…
Feb 23, 2016
bab4263
Merge pull request #60 from 3drobotics/start_cam_trigger_after_first_…
m4gr3d Feb 23, 2016
8067d50
Bump version for the dronekit-android client library
m4gr3d Feb 23, 2016
0a79bf2
Update the supported build variants
m4gr3d Feb 23, 2016
ff77d3c
Merge branches 'develop' and 'video_pipeline_improvements' of ssh://g…
m4gr3d Feb 24, 2016
24a5a5a
Update based on review
m4gr3d Feb 24, 2016
9d2a69b
Merge pull request #50 from 3drobotics/video_pipeline_improvements
m4gr3d Feb 24, 2016
5020c1e
Merge branch 'develop' of ssh://github.com/3drobotics/dronekit-androi…
m4gr3d Feb 24, 2016
3ee01f2
Bump for beta 1 release
m4gr3d Feb 24, 2016
60b2fcf
Rename `onVideoStreamPacketReceived()` callback to better reflect its…
m4gr3d Feb 24, 2016
1e0d075
Add javadocs for the `IVideoStreamCallback`
m4gr3d Feb 24, 2016
8b3aadf
Rename NALU* classes to Nalu*
m4gr3d Feb 24, 2016
7190a20
Remove unused `StreamingListener` interface
m4gr3d Feb 24, 2016
5bad736
Move the media decoding logic to the client library
m4gr3d Feb 24, 2016
4078eea
Remove redundant media codec logic
m4gr3d Feb 24, 2016
1330074
Always save wifi ssid when connected
Feb 26, 2016
9e75fff
Merge pull request #59 from 3drobotics/connect_wifi_inapp
m4gr3d Feb 27, 2016
8b98016
Merge pull request #63 from 3drobotics/release-1.5.2.beta.1
m4gr3d Feb 27, 2016
d553d5c
Merge branch 'develop' of ssh://github.com/3drobotics/dronekit-androi…
m4gr3d Feb 27, 2016
5275663
Bump version build to the third beta
m4gr3d Feb 27, 2016
b513c3c
Override default equals, hashCode and toString methods for the missio…
m4gr3d Mar 1, 2016
bbf96ed
Override toString() for the `MissionItem` class
m4gr3d Mar 1, 2016
0ff5597
Override toString() for the `Circle` class
m4gr3d Mar 1, 2016
fdb94f9
Allow negative radius for a circle mission item
m4gr3d Mar 1, 2016
966508c
Merge pull request #66 from 3drobotics/add_to_string_equals_to_missio…
Mar 1, 2016
e7c0994
Bump build for beta 3
m4gr3d Mar 1, 2016
4280391
Merge pull request #64 from 3drobotics/release-1.5.2.beta.2
m4gr3d Mar 1, 2016
6e68246
Merge pull request #67 from 3drobotics/release-1.5.2.beta.3
m4gr3d Mar 7, 2016
dd14c1d
Updated ClientLib version to release
Mar 7, 2016
d3c0e3b
Version build bump for production release
m4gr3d Mar 8, 2016
a5b7da7
Update client library dependencies to fix travis build issues
m4gr3d Mar 8, 2016
4f965d9
Merge pull request #378 from dronekit/release-1.5.2
m4gr3d Mar 8, 2016
935b49c
Receiving PX4 parameters supported
KiBa1215 Feb 16, 2016
d33fcdf
Merge branch 'develop' of https://github.com/KiBa1215/dronekit-androi…
KiBa1215 Apr 1, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ClientLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
ext {
VERSION_MAJOR = 2
VERSION_MINOR = 8
VERSION_PATCH = 0
VERSION_PATCH = 1
VERSION_SUFFIX = "release"

PUBLISH_ARTIFACT_ID = 'dronekit-android'
Expand Down Expand Up @@ -59,7 +59,7 @@ dependencies {
compile "com.google.android.gms:play-services-base:${play_services_version}"

compile project(':Mavlink')
releaseCompile files('libs/Mavlink.jar')
compile files('libs/Mavlink.jar')
}

assemble.dependsOn ':Mavlink:jar'
Expand Down
55 changes: 51 additions & 4 deletions ClientLib/src/main/java/com/o3dr/android/client/Drone.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.o3dr.android.client.apis.MissionApi;
import com.o3dr.android.client.apis.VehicleApi;
import com.o3dr.android.client.interfaces.DroneListener;
import com.o3dr.android.client.interfaces.LinkListener;
import com.o3dr.android.client.utils.TxPowerComplianceCountries;
import com.o3dr.services.android.lib.coordinate.LatLong;
import com.o3dr.services.android.lib.drone.attribute.AttributeEvent;
Expand All @@ -26,6 +27,7 @@
import com.o3dr.services.android.lib.drone.companion.solo.SoloEvents;
import com.o3dr.services.android.lib.drone.connection.ConnectionParameter;
import com.o3dr.services.android.lib.drone.connection.ConnectionResult;
import com.o3dr.services.android.lib.gcs.link.LinkConnectionStatus;
import com.o3dr.services.android.lib.drone.mission.Mission;
import com.o3dr.services.android.lib.drone.mission.item.MissionItem;
import com.o3dr.services.android.lib.drone.property.Altitude;
Expand All @@ -44,6 +46,8 @@
import com.o3dr.services.android.lib.gcs.follow.FollowState;
import com.o3dr.services.android.lib.gcs.follow.FollowType;
import com.o3dr.services.android.lib.gcs.returnToMe.ReturnToMeState;
import com.o3dr.services.android.lib.gcs.link.LinkEvent;
import com.o3dr.services.android.lib.gcs.link.LinkEventExtra;
import com.o3dr.services.android.lib.mavlink.MavlinkMessageWrapper;
import com.o3dr.services.android.lib.model.AbstractCommandListener;
import com.o3dr.services.android.lib.model.IDroneApi;
Expand All @@ -60,7 +64,6 @@
* Created by fhuya on 11/4/14.
*/
public class Drone {

private static final String CLAZZ_NAME = Drone.class.getName();
private static final String TAG = Drone.class.getSimpleName();

Expand Down Expand Up @@ -108,6 +111,7 @@ public void binderDied() {

private final AtomicReference<IDroneApi> droneApiRef = new AtomicReference<>(null);
private ConnectionParameter connectionParameter;
private LinkListener linkListener;
private ExecutorService asyncScheduler;

// flightTimer
Expand Down Expand Up @@ -391,14 +395,35 @@ private <T extends Parcelable> T getAttributeDefaultValue(String attributeType)
}
}

/**
* Connect to a vehicle using a specified {@link ConnectionParameter}.
*
* @param connParams Specified parameters to determine how to connect the vehicle.
*/
public void connect(final ConnectionParameter connParams) {
connect(connParams, null);
}

/**
* Connect to a vehicle using a specified {@link ConnectionParameter} and a {@link LinkListener}
* callback.
*
* @param connParams Specified parameters to determine how to connect the vehicle.
* @param linkListener A callback that will update the caller on the state of the link connection.
*/
public void connect(ConnectionParameter connParams, LinkListener linkListener) {
VehicleApi.getApi(this).connect(connParams);
this.connectionParameter = connParams;
this.linkListener = linkListener;
}

/**
* Disconnect from the vehicle.
*/
public void disconnect() {
VehicleApi.getApi(this).disconnect();
this.connectionParameter = null;
this.linkListener = null;
}

private static AbstractCommandListener wrapListener(final Handler handler, final AbstractCommandListener listener) {
Expand Down Expand Up @@ -761,14 +786,18 @@ public void onRetrievalFailed() {
final Bundle eventInfo = new Bundle(1);
boolean isEUCompliant = !TxPowerComplianceCountries.getDefaultCountry().name().equals(compliantCountry);
eventInfo.putBoolean(SoloEventExtras.EXTRA_SOLO_EU_TX_POWER_COMPLIANT, isEUCompliant);
sendEventToListeners(SoloEvents.SOLO_EU_TX_POWER_COMPLIANCE_UPDATED, eventInfo);
sendDroneEventToListeners(SoloEvents.SOLO_EU_TX_POWER_COMPLIANCE_UPDATED, eventInfo);
break;

case LinkEvent.LINK_STATE_UPDATED:
sendLinkEventToListener(extras);
return;
}

sendEventToListeners(attributeEvent, extras);
sendDroneEventToListeners(attributeEvent, extras);
}

private void sendEventToListeners(final String attributeEvent, final Bundle extras) {
private void sendDroneEventToListeners(final String attributeEvent, final Bundle extras) {
if (droneListeners.isEmpty()) {
return;
}
Expand All @@ -787,6 +816,24 @@ public void run() {
});
}

private void sendLinkEventToListener(Bundle extras) {
if (linkListener == null) {
return;
}

if (extras != null) {
final LinkConnectionStatus status = extras.getParcelable(LinkEventExtra.EXTRA_CONNECTION_STATUS);
if (status != null) {
handler.post(new Runnable() {
@Override
public void run() {
linkListener.onLinkStateUpdated(status);
}
});
}
}
}

void notifyDroneServiceInterrupted(final String errorMsg) {
if (droneListeners.isEmpty()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.os.Bundle;
import android.os.RemoteException;

import com.o3dr.services.android.lib.drone.connection.ConnectionResult;
import com.o3dr.services.android.lib.model.IObserver;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
* @since 2.6.8
*/
public class CameraApi extends Api {

private static final ConcurrentHashMap<Drone, CameraApi> apiCache = new ConcurrentHashMap<>();
private static final Builder<CameraApi> apiBuilder = new Builder<CameraApi>() {
@Override
Expand Down Expand Up @@ -73,13 +72,14 @@ private CameraApi(Drone drone) {
* Attempt to grab ownership and start the video stream from the connected drone. Can fail if
* the video stream is already owned by another client.
*
* @param surface Surface object onto which the video is decoded.
* @param tag Video tag.
* @param videoProps Non-null video properties. @see VIDEO_PROPS_UDP_PORT
* @param listener Register a callback to receive update of the command execution status.
* @param surface Surface object onto which the video is decoded.
* @param tag Video tag.
* @param videoProps Non-null video properties. @see VIDEO_PROPS_UDP_PORT
* @param listener Register a callback to receive update of the command execution status.
* @since 2.6.8
*/
public void startVideoStream(@NonNull final Surface surface, final String tag, @NonNull Bundle videoProps, final AbstractCommandListener listener) {
public void startVideoStream(@NonNull final Surface surface, final String tag,
@NonNull Bundle videoProps, final AbstractCommandListener listener) {
if (surface == null || videoProps == null) {
postErrorEvent(CommandExecutionError.COMMAND_FAILED, listener);
return;
Expand Down
Loading