Skip to content

Commit

Permalink
Reorder mission items list.
Browse files Browse the repository at this point in the history
Fixed state update logic for the GuidedPoint.
  • Loading branch information
m4gr3d committed Feb 9, 2015
1 parent edae505 commit 70a64de
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,27 @@ protected Parcelable.Creator<SplineWaypoint> getMissionItemCreator() {
}
},

TAKEOFF("Takeoff") {
CIRCLE("Circle") {
@Override
public MissionItem getNewItem() {
return new Takeoff();
return new Circle();
}

@Override
protected Parcelable.Creator<Takeoff> getMissionItemCreator() {
return Takeoff.CREATOR;
protected Creator<Circle> getMissionItemCreator() {
return Circle.CREATOR;
}
},

REGION_OF_INTEREST("Region of Interest") {
@Override
public MissionItem getNewItem() {
return new RegionOfInterest();
}

@Override
protected Creator<RegionOfInterest> getMissionItemCreator() {
return RegionOfInterest.CREATOR;
}
},

Expand All @@ -75,29 +87,28 @@ protected Parcelable.Creator<ChangeSpeed> getMissionItemCreator(){
}
},

CAMERA_TRIGGER("Camera Trigger") {
TAKEOFF("Takeoff") {
@Override
public MissionItem getNewItem() {
return new CameraTrigger();
return new Takeoff();
}

@Override
protected Creator<CameraTrigger> getMissionItemCreator() {
return CameraTrigger.CREATOR;
protected Parcelable.Creator<Takeoff> getMissionItemCreator() {
return Takeoff.CREATOR;
}
},

EPM_GRIPPER("EPM Gripper") {
LAND("Land") {
@Override
public MissionItem getNewItem() {
return new EpmGripper();
return new Land();
}

@Override
protected Creator<EpmGripper> getMissionItemCreator() {
return EpmGripper.CREATOR;
protected Creator<Land> getMissionItemCreator() {
return Land.CREATOR;
}

},

RETURN_TO_LAUNCH("Return to Launch") {
Expand All @@ -112,63 +123,64 @@ protected Creator<ReturnToLaunch> getMissionItemCreator() {
}
},

LAND("Land") {
SURVEY("Survey") {
@Override
public MissionItem getNewItem() {
return new Land();
return new Survey();
}

@Override
protected Creator<Land> getMissionItemCreator() {
return Land.CREATOR;
protected Creator<Survey> getMissionItemCreator() {
return Survey.CREATOR;
}
},

CIRCLE("Circle") {
STRUCTURE_SCANNER("Structure Scanner") {
@Override
public MissionItem getNewItem() {
return new Circle();
return new StructureScanner();
}

@Override
protected Creator<Circle> getMissionItemCreator() {
return Circle.CREATOR;
protected Creator<StructureScanner> getMissionItemCreator() {
return StructureScanner.CREATOR;
}
},

REGION_OF_INTEREST("Region of Interest") {
CAMERA_TRIGGER("Camera Trigger") {
@Override
public MissionItem getNewItem() {
return new RegionOfInterest();
return new CameraTrigger();
}

@Override
protected Creator<RegionOfInterest> getMissionItemCreator() {
return RegionOfInterest.CREATOR;
protected Creator<CameraTrigger> getMissionItemCreator() {
return CameraTrigger.CREATOR;
}
},

SURVEY("Survey") {
EPM_GRIPPER("EPM Gripper") {
@Override
public MissionItem getNewItem() {
return new Survey();
return new EpmGripper();
}

@Override
protected Creator<Survey> getMissionItemCreator() {
return Survey.CREATOR;
protected Creator<EpmGripper> getMissionItemCreator() {
return EpmGripper.CREATOR;
}

},

STRUCTURE_SCANNER("Structure Scanner") {
YAW_CONDITION("Set Yaw"){
@Override
public MissionItem getNewItem() {
return new StructureScanner();
public MissionItem getNewItem(){
return new YawCondition();
}

@Override
protected Creator<StructureScanner> getMissionItemCreator() {
return StructureScanner.CREATOR;
protected Creator<YawCondition> getMissionItemCreator() {
return YawCondition.CREATOR;
}
},

Expand All @@ -182,18 +194,6 @@ public MissionItem getNewItem() {
protected Creator<SetServo> getMissionItemCreator() {
return SetServo.CREATOR;
}
},

YAW_CONDITION("Set Yaw"){
@Override
public MissionItem getNewItem(){
return new YawCondition();
}

@Override
protected Creator<YawCondition> getMissionItemCreator() {
return YawCondition.CREATOR;
}
};

private final static String EXTRA_MISSION_ITEM_TYPE = "extra_mission_item_type";
Expand Down
Binary file modified ClientLib/mobile/libs/AidlLib.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion ServiceApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android {
applicationId 'org.droidplanner.services.android'
minSdkVersion 14
targetSdkVersion 21
versionCode 10204
versionCode 10205
versionName getGitVersion()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public void pauseAtCurrentLocation() {
changeToGuidedMode(myDrone);
}else{
newGuidedCoord(myDrone.getGps().getPosition());
state = GuidedStates.IDLE;
}
}

Expand Down

0 comments on commit 70a64de

Please sign in to comment.