IUpgradeManager
interface IUpgradeManager
Description: Upgrade the management interface. After download OTA package,by instantiating the UpgradeManager object to upgrade the remote control or aircraft and other devices. The aircraft upgrade relies on the OTAUpgradeManager switchUpgradeMode() to switch to the high-speed upload mode.
method UpgradeManager
fun UpgradeManager(deviceId: Int)
Description: UpgradeMnager constructor
Input parameters: deviceId: device ID,It can be obtained through the device interface getDeviceNumber of the aircraft or the remote control
Output parameters: None。
Related parameters: None。
method init
fun init(clientType : UpgradeClientTypeEnum): IUpgradeManager
Description: Specify the type of device to be upgraded and initialize it
Input parameters: client type: UpgradeClientTypeEnum
Output parameters: None。
Related parameters: IUpgradeManager。
method registerUpgradeListener
fun registerUpgradeListener(listener:UpgradeListener)
Description: Register for upgrade status monitoring
Input parameters: listener: status listener. Refer to UpgradeListener
Output parameters: None。
Related parameters: UpgradeListener。
method startUpgradeFlow
fun startUpgradeFlow(file: File, md5: String?)
Description: Start the upgrade process of the device
Input parameters: file: OTA file
md5: package file md5, not necessary
Output parameters: None。
Related parameters: None。
method unInit
fun unInit()
Description: Release after the device upgrade is completed
Input parameters: None。
Output parameters: None。
Related parameters: None。