MissionUpdater
public protocol MissionUpdater : Peripheral
Mission updater peripheral
This peripheral can be retrieved by:
device.getPeripheral(Peripherals.missionUpdater)
-
Array of mission
Declaration
Swift
var missions: [String : Mission] { get }
-
Upload state of the last mission request
Declaration
Swift
var state: MissionUpdaterUploadState? { get }
-
File path of the uploading mission
Declaration
Swift
var currentFilePath: String? { get }
-
Progress of the upload.
Declaration
Swift
var currentProgress: Int? { get }
-
upload(filePath:
Default implementationoverwrite: postpone: makeDefault: ) Uploads a mission to the server. The mission is installed immediately or upon next reboot, depending on the
postpone
parameter. In any case, the mission will be activable on next reboot, thecomplete
function should be called for this purpose.Default Implementation
Uploads a mission to the server. The mission is installed immediately or upon next reboot, depending on the
postpone
parameter. In any case, the mission will be activable on next reboot, thecomplete
function should be called for this purpose.Declaration
Swift
func upload(filePath: URL, overwrite: Bool, postpone: Bool, makeDefault: Bool) -> CancelableCore?
Parameters
filePath
URL of the mission file to upload
overwrite
true
to overwrite any potentially existing mission with the same uidpostpone
true
to postpone the installation until next rebootmakeDefault
true
to make the uploaded mission the default one (starts at drone boot) -
Deletes a mission.
Declaration
Swift
func delete(uid: String, success: @escaping (Bool) -> Void)
Parameters
uid
internal id (given by the drone when the mission was installed).
success
true if the delete was successfull, else false
-
Browses all missions.
Declaration
Swift
func browse()
-
Completes the installation of the uploaded missions by rebooting the drone.
Declaration
Swift
func complete()