ActionServer
public class ActionServer
Provide vehicle actions (as a server) such as arming, taking off, and landing.
-
Initializes a new
ActionServerplugin.Normally never created manually, but used from the
Dronehelper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))Parameters
addressThe address of the
MavsdkServerinstance to connect toportThe port of the
MavsdkServerinstance to connect toschedulerThe scheduler to be used by
Observables -
Undocumented
See moreDeclaration
Swift
public struct RuntimeActionServerError : Error -
Undocumented
See moreDeclaration
Swift
public struct ActionServerError : Error -
Flight modes.
For more information about flight modes, check out https://docs.px4.io/master/en/config/flight_mode.html.
See moreDeclaration
Swift
public enum FlightMode : Equatable -
State to check if the vehicle can transition to respective flightmodes
See moreDeclaration
Swift
public struct AllowableFlightModes : Equatable -
Arming message type
See moreDeclaration
Swift
public struct ArmDisarm : Equatable -
Result type.
See moreDeclaration
Swift
public struct ActionServerResult : Equatable -
Subscribe to ARM/DISARM commands
Declaration
Swift
public lazy var armDisarm: Observable<ArmDisarm> { get set } -
Subscribe to DO_SET_MODE
Declaration
Swift
public lazy var flightModeChange: Observable<FlightMode> { get set } -
Subscribe to takeoff command
Declaration
Swift
public lazy var takeoff: Observable<Bool> { get set } -
Subscribe to land command
Declaration
Swift
public lazy var land: Observable<Bool> { get set } -
Subscribe to reboot command
Declaration
Swift
public lazy var reboot: Observable<Bool> { get set } -
Subscribe to shutdown command
Declaration
Swift
public lazy var shutdown: Observable<Bool> { get set } -
Subscribe to terminate command
Declaration
Swift
public lazy var terminate: Observable<Bool> { get set } -
Can the vehicle takeoff
Declaration
Swift
public func setAllowTakeoff(allowTakeoff: Bool) -> CompletableParameters
allowTakeoffIs takeoff allowed?
-
Can the vehicle arm when requested
Declaration
Swift
public func setArmable(armable: Bool, forceArmable: Bool) -> CompletableParameters
armableIs Armable now?
forceArmableIs armable with force?
-
Can the vehicle disarm when requested
Declaration
Swift
public func setDisarmable(disarmable: Bool, forceDisarmable: Bool) -> CompletableParameters
disarmableIs disarmable now?
forceDisarmableIs disarmable with force? (Kill)
-
Set which modes the vehicle can transition to (Manual always allowed)
Declaration
Swift
public func setAllowableFlightModes(flightModes: AllowableFlightModes) -> CompletableParameters
flightModes -
Get which modes the vehicle can transition to (Manual always allowed)
Declaration
Swift
public func getAllowableFlightModes() -> Single<AllowableFlightModes>
View on GitHub
Install in Dash
ActionServer Class Reference