SimulatorManager getFlyZoneLimitationEnabled/setFlyZoneLimitationEnabled
已完成Hello!
Looking at the SDK v5.4 docs for ISimulatorManager, there is no mention about the methods setFlyZoneLimitationEnabled and getFlyZoneLimitationEnabled. But on the SimulatorManager instance they are available. When calling them, unfortunately the completion callback never comes back with result:
SimulatorManager simulatorManager = SimulatorManager.getInstance();
simulatorManager.setFlyZoneLimitationEnabled(true, new CommonCallbacks.CompletionCallback() {
@Override
public void onSuccess() {
Timber.d("setFlyZoneLimitationEnabled: success");
}
@Override
public void onFailure(@NonNull IDJIError error) {
Timber.d("setFlyZoneLimitationEnabled: %s", error.description());
}
});
simulatorManager.getFlyZoneLimitationEnabled(new CommonCallbacks.CompletionCallbackWithParam<Boolean>() {
@Override
public void onSuccess(Boolean aBoolean) {
Timber.d("getFlyZoneLimitationEnabled: %s", aBoolean);
}
@Override
public void onFailure(@NonNull IDJIError error) {
Timber.d("getFlyZoneLimitationEnabled: %s", error.description());
}
});
Is there another way to enable fly zone limitation when using Simulator mode on the drone? I suppose these methods should make it work, but perhaps they are not yet actively supported?
Cheers,
Jernej
-
Hello DJI Developer Support!
Is there any other way to simulate fly zone limitations? It's quite difficult to do actual development if we need to go outside finding different authorization zones.
-
We just tried using DJI Assistant 2 (Enterprise Series). When opening the app and going under the tab Simulator, it says the following under Note:
No-Fly Zone limit is not effective in the Simulator
And indeed, positioning aircraft at a location inside Authorization zone does nothing (no warning or prevention on take off and when flying), basically it acts in a similar way if we would be running it via Simulator Widget inside the app using SimulatorManager. Are we missing something or is there any other way?
请先登录再写评论。
评论
8 条评论