File tree 2 files changed +15
-1
lines changed
ClientLib/src/main/java/com/o3dr/android/client/apis/drone
ServiceApp/src/org/droidplanner/services/android/api
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,20 @@ public class DroneStateApi {
22
22
*
23
23
* @param arm true to arm, false to disarm.
24
24
*/
25
+ public static void arm (Drone drone , boolean arm ) {
26
+ Bundle params = new Bundle ();
27
+ params .putBoolean (EXTRA_ARM , arm );
28
+ params .putBoolean (EXTRA_EMERGENCY_DISARM , false );
29
+ drone .performAsyncAction (new Action (ACTION_ARM , params ));
30
+ }
31
+
32
+ /**
33
+ * Arm or disarm the connected drone.
34
+ *
35
+ * @param arm true to arm, false to disarm.
36
+ * @param emergencyDisarm true to skip landing check and disarm immediately,
37
+ * false to disarm only if it is safe to do so.
38
+ */
25
39
public static void arm (Drone drone , boolean arm , boolean emergencyDisarm ) {
26
40
Bundle params = new Bundle ();
27
41
params .putBoolean (EXTRA_ARM , arm );
Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ public void performAction(Action action) throws RemoteException {
400
400
//DRONE STATE ACTIONS
401
401
case StateActions .ACTION_ARM :
402
402
boolean doArm = data .getBoolean (StateActions .EXTRA_ARM );
403
- DroneApiUtils .arm (getDrone (), doArm , false );
403
+ DroneApiUtils .arm (getDrone (), doArm );
404
404
break ;
405
405
406
406
case StateActions .ACTION_SET_VEHICLE_MODE :
You can’t perform that action at this time.
0 commit comments