dji-sdk / Mobile-UXSDK-iOS

DJI Mobile UXSDK is a suite of product agnostic UI objects that fast tracks the development of iOS applications using the DJI Mobile SDK.
Other
73 stars 43 forks source link

DULAircraftBatteryTemperatureChecklistItem Issues #11

Closed fontained closed 6 years ago

fontained commented 6 years ago

First of all, the header file for this DULAircraftBatteryTemperatureChecklistItem CheckListItem is missing in the library.

To solve it, I added the following header in the library : DULAircraftBatteryTemperatureChecklistItem.h `

import "DULPreflightChecklistItem.h"

@interface DULAircraftBatteryTemperatureChecklistItem : DULPreflightChecklistItem

@end `

Furthermore, if we try to remove this item from the DefaultCheckList, the application crashes. This issue is really annoying for people using A3+LB2 without DJI batteries because if we don't remove this CheckListItem, the item remains in PendingState and, the complete PreflightCheckList remains also in Pending State.

This is only valid for this item. Others items can be removed from the DefaultCheckList without problem. It seems that some Listeners are not properly removed from the component when the component itself is removed from the list.

This is the code crashing the app. if (item is DULAircraftBatteryTemperatureChecklistItem) { item.stopChecking() DULPreflightChecklistManager.default().remove(item) } Could you please provide us a fix or provide us the library code to fix this issue ourself?

UILibrary used version is 4.2.2 IOS: 10.3.3 on Ipad Software Language: Swift 3 XCode: 8.3.3

fontained commented 6 years ago

Solved in SDK 4.3