You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However I see getFlightController is returning null, while mobile is connected to the controller and simulator is running, drone is connected to the mac.
Just a workaround (yes, this is dirty hack, and I know, this is obviously, but may help someone to save time a bit).
FlightControllerflightController = null;
for (inti=0; i<3; i++) {
//TODO: SDK bug? https://github.com/DJI-Mobile-SDK-Tutorials/Android-GSDemo-GoogleMap/issues/15flightController = ((Aircraft) product).getFlightController();
if (flightController!=null)
break;
else {
try {
Thread.sleep(300);
} catch (InterruptedExceptione) {
e.printStackTrace();
}
}
}
if (flightController==null)
thrownewError("Cannot get flightController");
I'm sorry. After a month of getting this error, I can say, that this is not a solution at all. If you didn't get a FlightController at a first call, you, probably, never get it.
Sorry again.
I'm following this sample: https://developer.dji.com/mobile-sdk/documentation/android-tutorials/GSDemo-Google-Map.html
However I see getFlightController is returning null, while mobile is connected to the controller and simulator is running, drone is connected to the mac.
Problem line:
Android-GSDemo-GoogleMap/GSDemo/app/src/main/java/com/dji/GSDemo/GoogleMap/MainActivity.java
Line 210 in 684f224
The text was updated successfully, but these errors were encountered: