MSDK 5.9.0 + DJI Mini 3 Pro - Virtual stick problem
已完成Hello
I' m trying to develop an Android app based on MSDK v5.9.0 example to control DJI Mini 3 pro via RC-N1 controller.
I'm using virtual stick mode - enable virtual stick by calling "virtualStickVM.enableVirtualStick" and control the drone by sending "virtualStickVM.setLeftPosition" and "virtualStickVM.setRightPosition" with 10 Hz rate. Hardware switch on RC controller stays in "Normal" position.
I'm noted that sometimes drone is flying fine, but sometimes it stops after takeoff and continues to hover not responding on any virtual stick commands. Landing command is also not executed even when "landing confirmation" command is sent. Monitoring of the virtual stick status says the virtual stick is still enabled.
It seems the only difference of flight status in cases of fine flight and no flight is in FlightMode. Every time when the drone flies well, the flight mode returned by FlightControllerKey.KeyFlightMode is "VIRTUAL_STICK". When drone doesn't fly, this status is "GPS_NORMAL".
I didn't find any special command to enter "VIRTUAL_STICK" mode. Can you please tell me what command I need to execute or what conditions I need to fulfill to make sure the drone will be in the "VIRTUAL_STICK" mode and execute my virtual stick commands.
Thank you very much in advance
-
Thank you for your help.
I called 'virtualStickVM.enableVirtualStick' before takeoff, and not repeated this command after takeoff, because 'virtualStickVM.currentVirtualStickStateInfo.value?.state?.isVirtualStickEnable' returned true every time I check it. It seems repeated call of 'virtualStickVM.enableVirtualStick' after takeoff solves the problem, thank you.
请先登录再写评论。
评论
3 条评论