1.
I want to get the MaxAngularVelocity for a hotspot-mission. The following code works sometimes, but not alway:
Sometimes, i get the following error in args(0):
Is it the wrong callback-event?
2.
The second problem is, that i want to read the warninglevel of the AirSenseSystemInformation:
https://developer.dji.com/api-refer...sesysteminformation_systemwarninglevel_inline
It is already failing by initializing the airsense-object. Could somebody, who is familar with javaobject, help me? Thank you very much...
I want to get the MaxAngularVelocity for a hotspot-mission. The following code works sometimes, but not alway:
B4X:
If HotPointOperator.IsInitialized Then
Dim HotPointMissionControl As JavaObject = HotPointOperator
Dim RadiusSicherung As Double=50
Dim cc As Object=HotPointMissionControl.CreateEventFromUI("dji.common.util.CommonCallbacks$CompletionCallbackWith", "callback", Null)
HotPointMissionControl.RunMethod("getMaxAngularVelocityForRadius", Array(RadiusSicherung,cc))
Wait For Callback_Event (MethodName As String, args() As Object)
Dim MaxAngularVelocity As Float = args(0)
End If
Sometimes, i get the following error in args(0):
B4X:
java.lang.NumberFormatException: For input string: "dji.common.gimbal.GimbalState@f794e52d"
Is it the wrong callback-event?
2.
The second problem is, that i want to read the warninglevel of the AirSenseSystemInformation:
https://developer.dji.com/api-refer...sesysteminformation_systemwarninglevel_inline
LEVEL_0 The system detects the airplane but the DJI aircraft Is either far away from the airplane Or Is in the opposite direction of the airplane's heading.
LEVEL_1 The system detects the airplane. The probability that it will pass through the location of the DJI aircraft Is considered low.
LEVEL_2 The system detects the airplane. The probability that it will pass through the location of the DJI aircraft Is considered medium.
LEVEL_3 The system detects the airplane. The probability that it will pass through the location of the DJI aircraft Is considered high.
LEVEL_4 The system detects the airplane. The probability that it will pass through the location of the DJI aircraft Is very high.
UNKNOWN Unknown.
B4X:
Dim flightcontrollerjo As JavaObject = controller
Dim airsense As JavaObject = flightcontrollertjo.RunMethod("AirSenseSystemInformation", Null)
If airsense.IsInitialized Then
Log("AirSense initialisiert!")
Dim cc As Object = airsense.CreateEventFromUI("dji.common.flightcontroller.adsb$Callback", "callback", Null)
airsense.RunMethod("setStateCallback", Array As Object(cc))
Wait For (airsense) callback_Event (MethodName As String, Args() As Object)
Dim airsensestate As JavaObject= Args(0)
Dim WarningLevel As String = airsensestate.RunMethod("getWarningLevel", Null)
Log("Warning-Level:" & WarningLevel)
Else
Log("ADSP not ready!")
End If
It is already failing by initializing the airsense-object. Could somebody, who is familar with javaobject, help me? Thank you very much...