Skip to content

Commit

Permalink
Release: Removing unfinished/untested missionItems for the release
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurbenemann committed Feb 25, 2014
1 parent 1fd0b41 commit 9bcbb3d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,20 @@
import java.security.InvalidParameterException;

import org.droidplanner.drone.variables.mission.MissionItem;
import org.droidplanner.drone.variables.mission.commands.ReturnToHome;
import org.droidplanner.drone.variables.mission.waypoints.Land;
import org.droidplanner.drone.variables.mission.waypoints.LoiterTime;
import org.droidplanner.drone.variables.mission.waypoints.LoiterTurns;
import org.droidplanner.drone.variables.mission.waypoints.RegionOfInterest;
import org.droidplanner.drone.variables.mission.waypoints.Takeoff;
import org.droidplanner.drone.variables.mission.waypoints.Waypoint;


public enum MissionItemTypes {
WAYPOINT("Waypoint"),
TAKEOFF("Takeoff"),
RTL("Return to Launch"),
//RTL("Return to Launch"),
LAND("Land"),
LOITERN("Circle"),
LOITERT("Loiter"),
//LOITERN("Circle"),
//LOITERT("Loiter"),
//LOITER("Loiter indefinitly"),
ROI("Region of Interest"),
//ROI("Region of Interest"),
SURVEY("Survey");

private final String name;
Expand All @@ -37,8 +33,9 @@ public MissionItem getNewItem(MissionItem item) throws InvalidItemException {
switch (this) {
case LAND:
return new Land(item);
//case LOITER:
// return new LoiterInfinite(item);
/*
case LOITER:
return new LoiterInfinite(item);
case LOITERN:
return new LoiterTurns(item);
case LOITERT:
Expand All @@ -47,6 +44,7 @@ public MissionItem getNewItem(MissionItem item) throws InvalidItemException {
return new RegionOfInterest(item);
case RTL:
return new ReturnToHome(item);
*/
case TAKEOFF:
return new Takeoff(item);
case WAYPOINT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected int getResource() {
@Override
protected void setupViews(View view) {
super.setupViews(view);
typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.LOITERN));
//typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.LOITERN));

LoiterTurns item = (LoiterTurns) this.item;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected int getResource() {
@Override
protected void setupViews(View view) {
super.setupViews(view);
typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.LOITERT));
//typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.LOITERT));

LoiterTime item = (LoiterTime) this.item;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected int getResource() {
@Override
protected void setupViews(View view) {
super.setupViews(view);
typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.RTL));
//typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.RTL));

//altitudeSeekBar = (SeekBarWithText) view.findViewById(R.id.altitudeView);
//altitudeSeekBar.setValue(((ReturnToHome) item).getHeight().valueInMeters());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ protected int getResource() {
@Override
protected void setupViews(View view) {
super.setupViews(view);
typeSpinner.setSelection(commandAdapter
.getPosition(MissionItemTypes.ROI));
//typeSpinner.setSelection(commandAdapter.getPosition(MissionItemTypes.ROI));

altitudeSeekBar = (SeekBarWithText) view.findViewById(R.id.altitudeView);
altitudeSeekBar.setValue(((RegionOfInterest) item).getAltitude().valueInMeters());
Expand Down

0 comments on commit 9bcbb3d

Please sign in to comment.