Our team is finding on multiple aircraft that the last two DJI Mobile SDKs are not producing all of the execution states for an RTH event. Below is what our team compiled highlighting the issue. Curious if anyone else is seeing this and if a bug may need some serious attention in the next Mobile DJI SDK release. This is presenting a safety issue for pilots needing to know RTH is happening and the events taking place.
The Problem When observing the Return to Home state on both iOS and Android, we receive inconsistent results between hardware. The results match between platforms so we can eliminate a direct SDK issue. When testing with a simulator with the problematic hardware, we do receive all of the expected state changes. We can also eliminate that the problem is only affected by a single drone firmware since we have similar issues with both the M2ED and M210. We have also found that when a critical battery is calling RTH we get back all of the states but when calling the startGoHomeWithCompletionwe do not get all those events. Please see below our results of using 4.11.2 and 4.12 DJI Mobile SDKs.
DJI Keys
iOS - DJIFlightControllerParamGoHomeExecutionState
Code from our application:
// RTH //DJIFlightControllerParamGoHomeExecutionState if let key = DJIFlightControllerKey(param: DJIFlightControllerParamGoHomeExecutionState) { manager.startListeningForChanges(on: key, withListener: self, andUpdate: { _, newKeyedValue in guard let value = newKeyedValue?.unsignedIntegerValue, let state = DJIGoHomeExecutionState(rawValue: value) else { return } switch state { case .goUpToHeight, .autoFlyToHomePoint, .turnDirectionToHomePoint: self.alertPilotOfRTH(showAlert: true) default: return } }) }
Android (tested on Android 9) - FlightControllerKey.GO_HOME_STATUS
Code from our application:
val key = FlightControllerKey.create(FlightControllerKey.GO_HOME_STATUS) KeyManager.getInstance().addListener(key, KeyListener { oldValue, newValue -> ... })
Events Received
Mavic Pro Firmware Tested: States Received: - GO_UP_TO_HEIGHT
- TURN_DIRECTION_TO_HOME_POINT
- GO_UP_TO_HEIGHT
- AUTO_FLY_TO_HOME_POINT
- COMPLETED
- NOT_EXECUTING
M2ED Tested with our App Store and Enterprise app on iOS 13.4.1 Firmware: States Received when calling goHome action: - GO_DOWN_TO_GROUND
- COMPLETED
- NOT_EXECUTING
States Received when critical battery level reached and RTH called: - GO_UP_TO_HEIGHT
- TURN_DIRECTION_TO_HOME_POINT
- GO_UP_TO_HEIGHT
- AUTO_FLY_TO_HOME_POINT
- COMPLETED
- NOT_EXECUTING
M210 Tested with our App Store and Enterprise app on iOS 13.4.1
Firmware: States Received: - GO_DOWN_TO_GROUND
- COMPLETED
- NOT_EXECUTING
|