File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
src/main/java/io/mavsdk/example Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ dependencies {
5959 implementation ' com.google.android.material:material:1.1.0'
6060 implementation ' com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0'
6161 implementation ' com.mapbox.mapboxsdk:mapbox-android-sdk:8.2.1'
62- implementation ' io.mavsdk:mavsdk:0.3.0 '
63- implementation ' io.mavsdk:mavsdk-server:0.3.0 '
62+ implementation ' io.mavsdk:mavsdk:0.3.1 '
63+ implementation ' io.mavsdk:mavsdk-server:0.3.1 '
6464 implementation ' org.slf4j:slf4j-api:1.7.28'
6565
6666 testImplementation ' junit:junit:4.12'
Original file line number Diff line number Diff line change 7272dependencies {
7373 checkstyleClasspath ' com.puppycrawl.tools:checkstyle:8.5'
7474
75- implementation ' io.mavsdk:mavsdk:0.2.0 '
75+ implementation ' io.mavsdk:mavsdk:0.3.1 '
7676
7777 implementation ' ch.qos.logback:logback-core:1.2.3'
7878 implementation ' ch.qos.logback:logback-classic:1.2.3'
Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ public static void main(String[] args) {
2020 missionItems .add (generateMissionItem (47.397825620791885 , 8.5450092830163271 ));
2121 missionItems .add (generateMissionItem (47.397832880000003 , 8.5455939999999995 ));
2222
23+ Mission .MissionPlan missionPlan = new Mission .MissionPlan (missionItems );
24+
2325 System drone = new System ();
2426
2527 drone .getMission ()
2628 .setReturnToLaunchAfterMission (true )
27- .andThen (drone .getMission ().uploadMission (missionItems )
29+ .andThen (drone .getMission ().uploadMission (missionPlan )
2830 .doOnComplete (() -> logger .debug ("Upload succeeded" )))
2931 .andThen (drone .getAction ().arm ())
3032 .andThen (drone .getMission ().startMission ()
@@ -34,7 +36,7 @@ public static void main(String[] args) {
3436 CountDownLatch latch = new CountDownLatch (1 );
3537 drone .getMission ()
3638 .getMissionProgress ()
37- .filter (progress -> progress .getCurrentItemIndex () == progress .getMissionCount ())
39+ .filter (progress -> progress .getCurrent () == progress .getTotal ())
3840 .take (1 )
3941 .subscribe (ignored -> latch .countDown ());
4042
You can’t perform that action at this time.
0 commit comments