Safety waypoint function
class PathPoint
public class PathPoint {
/**
* Emergency action type of the waypoint:
*
* 0: no action; 1: hover; 2: land; 3: return to home; The default value is 0: no action.
*/
public short EmgActUsr;
}
method doEmergencyAction
void doEmergencyAction(EmergencyAction action, CallbackWithNoParam callback);
Description: Execute an emergency action when a waypoint action is executed.
Input parameter:
- action*: Emergency action type of the waypoint
- callback*: Listening callback of setting the emergency action type of the waypoint
Output parameter: None
**Related parameter: action, CallbackWithOneParam
enum EmergencyAction
Description: Emergency action type.
public enum EmergencyAction {
/**
* No action
*/
NONE(0),
/**
* Hover
*/
HOVER(1),
/**
* Land
*/
LAND(2),
/**
* Return to home
*/
GO_HOME(3);
};
64