ManualControl
public class ManualControl
Enable manual control using e.g. a joystick or gamepad.
-
Initializes a new
ManualControlplugin.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 RuntimeManualControlError : Error -
Undocumented
See moreDeclaration
Swift
public struct ManualControlError : Error -
Result type.
See moreDeclaration
Swift
public struct ManualControlResult : Equatable -
Start position control using e.g. joystick input.
Requires manual control input to be sent regularly already. Requires a valid position using e.g. GPS, external vision, or optical flow.
Declaration
Swift
public func startPositionControl() -> Completable -
Start altitude control
Requires manual control input to be sent regularly already. Does not require a valid position e.g. GPS.
Declaration
Swift
public func startAltitudeControl() -> Completable -
Set manual control input
The manual control input needs to be sent at a rate high enough to prevent triggering of RC loss, a good minimum rate is 10 Hz.
Declaration
Swift
public func setManualControlInput(x: Float, y: Float, z: Float, r: Float) -> CompletableParameters
xvalue between -1. to 1. negative -> backwards, positive -> forwards
yvalue between -1. to 1. negative -> left, positive -> right
zvalue between -1. to 1. negative -> down, positive -> up (usually for now, for multicopter 0 to 1 is expected)
rvalue between -1. to 1. negative -> turn anti-clockwise (towards the left), positive -> turn clockwise (towards the right)
View on GitHub
Install in Dash
ManualControl Class Reference