Skip to content

Commit c6c6c54

Browse files
Merge branch 'master' into beta
2 parents f8bde99 + 5663448 commit c6c6c54

23 files changed

+551
-67
lines changed

Android/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
package="org.droidplanner"
5-
android:versionCode="107"
5+
android:versionCode="108"
66
android:versionName="please run version.sh to get the version name">
77

88
<uses-sdk

Android/res/layout/fragment_editor_detail_camera_trigger.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
<TextView
8282
style="@style/ModeDetailText"
83-
android:layout_width="wrap_content"
83+
android:layout_width="match_parent"
8484
android:layout_height="wrap_content"
8585
android:background="@drawable/mode_desc_rectangle"
8686
android:padding="12dp"
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
style="@style/missionItemDetailLayout" >
5+
6+
<org.droidplanner.android.widgets.spinners.SpinnerSelfSelect
7+
android:id="@+id/spinnerWaypointType"
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:layout_alignParentTop="true"
11+
android:layout_margin="5dp"
12+
android:entries="@array/ExampleWaypointType" />
13+
14+
<RelativeLayout
15+
android:id="@+id/title_rect"
16+
android:layout_width="match_parent"
17+
android:layout_height="64dp"
18+
android:layout_alignParentTop="true"
19+
android:background="@drawable/wp_title_rectangle" >
20+
21+
<TextView
22+
android:id="@+id/WaypointIndex"
23+
style="@style/largeMissionDetailText"
24+
android:layout_width="64dp"
25+
android:layout_height="wrap_content"
26+
android:layout_centerVertical="true"
27+
tools:text="22" />
28+
29+
<View
30+
android:id="@+id/title_div"
31+
android:layout_width="1dp"
32+
android:layout_height="54dp"
33+
android:layout_alignParentTop="true"
34+
android:layout_marginTop="5dp"
35+
android:layout_toRightOf="@id/WaypointIndex"
36+
android:background="@drawable/wp_title_div" />
37+
38+
<RelativeLayout
39+
android:id="@+id/title_content"
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:layout_centerVertical="true"
43+
android:layout_toRightOf="@id/title_div"
44+
android:orientation="vertical" >
45+
46+
<TextView
47+
android:id="@+id/WaypointType"
48+
style="@style/missionHeaderTitle"
49+
android:layout_width="wrap_content"
50+
android:layout_height="wrap_content"
51+
android:layout_marginLeft="12dp"
52+
android:text="@string/waypointType_EPM" />
53+
54+
<TextView
55+
android:id="@+id/DistanceLabel"
56+
style="@style/missionHeaderlabel"
57+
android:layout_width="wrap_content"
58+
android:layout_height="wrap_content"
59+
android:layout_alignLeft="@id/WaypointType"
60+
android:layout_below="@id/WaypointType" />
61+
</RelativeLayout>
62+
</RelativeLayout>
63+
64+
<ImageView
65+
android:id="@+id/menuHint"
66+
android:layout_width="wrap_content"
67+
android:layout_height="wrap_content"
68+
android:layout_alignBottom="@id/title_rect"
69+
android:layout_alignParentRight="true"
70+
android:layout_margin="10dp"
71+
android:src="@drawable/ic_menu_hint"
72+
tools:ignore="ContentDescription" />
73+
74+
75+
<TextView
76+
style="@style/ModeDetailText"
77+
android:layout_width="match_parent"
78+
android:layout_below="@id/title_rect"
79+
android:layout_height="wrap_content"
80+
android:background="@drawable/mode_desc_rectangle"
81+
android:padding="12dp"
82+
android:text="@string/waypointInfo_EpmGrabber" />
83+
84+
</RelativeLayout>
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
style="@style/missionItemDetailLayout" >
5+
6+
<org.droidplanner.android.widgets.spinners.SpinnerSelfSelect
7+
android:id="@+id/spinnerWaypointType"
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:layout_alignParentTop="true"
11+
android:layout_margin="5dp"
12+
android:entries="@array/ExampleWaypointType" />
13+
14+
<RelativeLayout
15+
android:id="@+id/title_rect"
16+
android:layout_width="match_parent"
17+
android:layout_height="64dp"
18+
android:layout_alignParentTop="true"
19+
android:background="@drawable/wp_title_rectangle" >
20+
21+
<TextView
22+
android:id="@+id/WaypointIndex"
23+
style="@style/largeMissionDetailText"
24+
android:layout_width="64dp"
25+
android:layout_height="wrap_content"
26+
android:layout_centerVertical="true"
27+
tools:text="22" />
28+
29+
<View
30+
android:id="@+id/title_div"
31+
android:layout_width="1dp"
32+
android:layout_height="54dp"
33+
android:layout_alignParentTop="true"
34+
android:layout_marginTop="5dp"
35+
android:layout_toRightOf="@id/WaypointIndex"
36+
android:background="@drawable/wp_title_div" />
37+
38+
<RelativeLayout
39+
android:id="@+id/title_content"
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:layout_centerVertical="true"
43+
android:layout_toRightOf="@id/title_div"
44+
android:orientation="vertical" >
45+
46+
<TextView
47+
android:id="@+id/WaypointType"
48+
style="@style/missionHeaderTitle"
49+
android:layout_width="wrap_content"
50+
android:layout_height="wrap_content"
51+
android:layout_marginLeft="12dp"
52+
android:text="@string/waypointType_Set_Servo" />
53+
54+
<TextView
55+
android:id="@+id/DistanceLabel"
56+
style="@style/missionHeaderlabel"
57+
android:layout_width="wrap_content"
58+
android:layout_height="wrap_content"
59+
android:layout_alignLeft="@id/WaypointType"
60+
android:layout_below="@id/WaypointType" />
61+
</RelativeLayout>
62+
</RelativeLayout>
63+
64+
<ImageView
65+
android:id="@+id/menuHint"
66+
android:layout_width="wrap_content"
67+
android:layout_height="wrap_content"
68+
android:layout_alignBottom="@id/title_rect"
69+
android:layout_alignParentRight="true"
70+
android:layout_margin="10dp"
71+
android:src="@drawable/ic_menu_hint"
72+
tools:ignore="ContentDescription" />
73+
74+
<LinearLayout
75+
android:layout_width="match_parent"
76+
android:layout_height="wrap_content"
77+
android:layout_below="@id/title_rect"
78+
android:orientation="vertical"
79+
android:paddingBottom="5dp" >
80+
81+
<TextView
82+
style="@style/ModeDetailText"
83+
android:layout_width="match_parent"
84+
android:layout_height="wrap_content"
85+
android:background="@drawable/mode_desc_rectangle"
86+
android:padding="12dp"
87+
android:text="@string/waypointInfo_SetServo" />
88+
89+
<org.droidplanner.android.widgets.spinnerWheel.CardWheelHorizontalView
90+
android:id="@+id/picker1"
91+
style="@style/missionItemDetailCard"
92+
android:layout_width="match_parent"
93+
android:layout_height="wrap_content"
94+
android:orientation="vertical"
95+
android:text="@string/channel_label" />
96+
97+
<TextView
98+
style="@style/ModeDetailText"
99+
android:layout_width="wrap_content"
100+
android:layout_height="wrap_content"
101+
android:layout_gravity="left"
102+
android:text="@string/pwm"
103+
android:textAppearance="?android:attr/textAppearanceMedium" />
104+
105+
<EditText
106+
android:id="@+id/PwmEditText"
107+
android:layout_width="match_parent"
108+
android:layout_height="wrap_content"
109+
android:inputType="number"
110+
android:imeOptions="actionDone"
111+
android:paddingLeft="16dp"
112+
android:paddingRight="16dp"
113+
/>
114+
115+
</LinearLayout>
116+
117+
</RelativeLayout>

Android/res/layout/fragment_editor_detail_survey.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,10 @@
115115
android:layout_toRightOf="@id/staticText"
116116
android:entries="@array/ExampleCameraArray" />
117117

118-
<CheckBox
119-
android:id="@+id/checkBoxInnerWPs"
120-
android:layout_width="wrap_content"
121-
android:layout_height="wrap_content"
122-
android:layout_alignParentLeft="true"
123-
android:layout_below="@id/cameraFileSpinner"
124-
android:text="@string/inner_wps"
125-
android:visibility="gone" />
126-
127-
<CheckBox
128-
android:id="@+id/CheckBoxFootprints"
129-
android:layout_width="wrap_content"
130-
android:layout_height="wrap_content"
131-
android:layout_alignParentRight="false"
132-
android:layout_below="@id/cameraFileSpinner"
133-
android:layout_toRightOf="@id/checkBoxInnerWPs"
134-
android:text="@string/footprint"
135-
android:visibility="gone" />
136-
137118
<LinearLayout
138119
android:layout_width="match_parent"
139120
android:layout_height="wrap_content"
140-
android:layout_below="@id/checkBoxInnerWPs"
121+
android:layout_below="@id/cameraFileSpinner"
141122
android:orientation="vertical" >
142123

143124
<HorizontalScrollView

Android/res/menu/menu_super_activiy.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@
2020
android:id="@+id/menu_load_mission"
2121
android:showAsAction="never"
2222
android:title="@string/load_mission"/>
23+
24+
<item
25+
android:id="@+id/menu_triggerCamera"
26+
android:showAsAction="never"
27+
android:title="Picture"/>
28+
<item
29+
android:id="@+id/menu_epm_release"
30+
android:showAsAction="never"
31+
android:title="Release"/>
32+
<item
33+
android:id="@+id/menu_epm_grab"
34+
android:showAsAction="never"
35+
android:title="Grab"/>
2336
</group>
2437

2538
<item

Android/res/values/strings.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@
182182
<string name="waypointType_Land">Land</string>
183183
<string name="waypointType_Change_Speed">Change Speed</string>
184184
<string name="waypointType_Camera_Trigger">Camera Trigger</string>
185+
<string name="waypointType_Set_Servo">Set Servo</string>
186+
<string name="waypointType_EPM">EPM</string>
185187
<string name="waypointType_Circle">Circle</string>
186188
<string name="waypointType_Loiter">Loiter</string>
187189
<string name="waypointType_ROI">Region of Interest</string>
@@ -203,8 +205,13 @@
203205
<string name="waypointInfo_SetHome">Changes the home location either to the current location or a specified location.</string>
204206
<string name="waypointInfo_SetSpeed">Change vehicle speed until the end of this mission.</string>
205207
<string name="waypointInfo_CameraTrigger">Trigger the camera shutter at regular distance intervals.</string>
208+
<string name="waypointInfo_SetServo">Move a servo to a particular PWM value.</string>
209+
<string name="waypointInfo_EpmGrabber">Release the payload of the EPM grabber</string>
206210
<string name="waypointInfo_ROI">Sets a location and altitude to point copter towards and to aim an optional camera.</string>
207211
<string name="waypointInfo_SetJump">Repeat waypoint</string>
212+
213+
<!-- Custom waypoint info -->
214+
<string name="pwm">PWM:</string>
208215

209216
<!-- Waypoint editor -->
210217
<string name="editor_err_land_rtl_added">One cannot add new waypoints after LAND or RTL</string>
@@ -344,6 +351,7 @@
344351
<string name="speed_unit">m/s</string>
345352
<string name="speed_label">Speed</string>
346353
<string name="length_label">Length</string>
354+
<string name="channel_label">Channel</string>
347355
<string name="ground_speed_label">Ground Speed</string>
348356
<string name="air_speed_label">Air Speed</string>
349357
<string name="default_angle_value">--°</string>

Android/src/org/droidplanner/android/activities/FlightActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,14 @@ public void onDroneEvent(DroneEventsType event, Drone drone) {
325325
enableSlidingUpPanel(drone);
326326
break;
327327

328+
case FOLLOW_START:
329+
//Extend the sliding drawer if collapsed.
330+
if(!mSlidingPanelCollapsing.get() && mSlidingPanel.isSlidingEnabled() &&
331+
!mSlidingPanel.isPanelExpanded()){
332+
mSlidingPanel.expandPanel();
333+
}
334+
break;
335+
328336
default:
329337
break;
330338
}

Android/src/org/droidplanner/android/activities/helpers/SuperUI.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.droidplanner.android.utils.Utils;
1111
import org.droidplanner.android.utils.prefs.DroidPlannerPrefs;
1212
import org.droidplanner.android.widgets.actionProviders.InfoBarActionProvider;
13+
import org.droidplanner.core.MAVLink.MavLinkROI;
1314
import org.droidplanner.core.drone.DroneInterfaces.DroneEventsType;
1415
import org.droidplanner.core.drone.DroneInterfaces.OnDroneListener;
1516
import org.droidplanner.core.gcs.GCSHeartbeat;
@@ -234,11 +235,18 @@ public void onNo() {
234235
case R.id.menu_load_mission:
235236
drone.getWaypointManager().getWaypoints();
236237
return true;
237-
238+
case R.id.menu_triggerCamera:
239+
MavLinkROI.triggerCamera(drone);
240+
return true;
241+
case R.id.menu_epm_grab:
242+
MavLinkROI.empCommand(drone, false);
243+
return true;
244+
case R.id.menu_epm_release:
245+
MavLinkROI.empCommand(drone, true);
246+
return true;
238247
case android.R.id.home:
239248
NavUtils.navigateUpFromSameTask(this);
240249
return true;
241-
242250
default:
243251
return super.onOptionsItemSelected(item);
244252
}

Android/src/org/droidplanner/android/dialogs/openfile/OpenFileDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ private static class OpenFileAsyncTask extends AsyncTask<String, Void, Boolean>
5959
public OpenFileAsyncTask(OpenFileDialog dialog){
6060
containerRef = new WeakReference<OpenFileDialog>(dialog);
6161
progressDialog = new ProgressDialog(dialog.context);
62+
progressDialog.setTitle("Processing...");
63+
progressDialog.setMessage("Please wait.");
6264
progressDialog.setIndeterminate(true);
63-
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
6465
}
6566

6667
@Override

0 commit comments

Comments
 (0)