sdk.Initialize("sdk")
#BridgeLogger: true
#MultiDex: true
#AdditionalJar: dji-sdk-provided-4.4.1, ReferenceOnly
/**
/* Allowed are values from 20 to 500 based on the Documentation
/**
public Object SetMaxFlightHeight(int height) {
B4ACompletionCallback cc = new B4ACompletionCallback();
getObject().setMaxFlightHeight(height, cc);
return cc;
}
public Object SetMaxFlightRadius(int radius) {
B4ACompletionCallback cc = new B4ACompletionCallback();
getObject().setMaxFlightRadius(radius, cc);;
return cc;
}
public Object SetMaxFlightRadiusLimitationEnabled(boolean enabled) {
B4ACompletionCallback cc = new B4ACompletionCallback();
getObject().setMaxFlightRadiusLimitationEnabled(enabled, cc);
return cc;
}
public Object GetMaxFlightHeight() {
B4ACompletionCallback cc = new B4ACompletionCallback();
getObject().getMaxFlightHeight(cc);;
return cc;
}
public Object GetMaxFlightRadius() {
B4ACompletionCallback cc = new B4ACompletionCallback();
getObject().getMaxFlightRadius(cc);
return cc;
}
public Object GetMaxFlightRadiusLimitationEnabled() {
B4ACompletionCallback cc = new B4ACompletionCallback();
getObject().getMaxFlightRadiusLimitationEnabled(cc);
return cc;
}
You can try to add this lines to the DjiFlightcontrollerWrapper.java
B4X:/** /* Allowed are values from 20 to 500 based on the Documentation /** public Object SetMaxFlightHeight(int height) { B4ACompletionCallback cc = new B4ACompletionCallback(); getObject().setMaxFlightHeight(height, cc); return cc; } public Object SetMaxFlightRadius(int radius) { B4ACompletionCallback cc = new B4ACompletionCallback(); getObject().setMaxFlightRadius(radius, cc);; return cc; } public Object SetMaxFlightRadiusLimitationEnabled(boolean enabled) { B4ACompletionCallback cc = new B4ACompletionCallback(); getObject().setMaxFlightRadiusLimitationEnabled(enabled, cc); return cc; } public Object GetMaxFlightHeight() { B4ACompletionCallback cc = new B4ACompletionCallback(); getObject().getMaxFlightHeight(cc);; return cc; } public Object GetMaxFlightRadius() { B4ACompletionCallback cc = new B4ACompletionCallback(); getObject().getMaxFlightRadius(cc); return cc; } public Object GetMaxFlightRadiusLimitationEnabled() { B4ACompletionCallback cc = new B4ACompletionCallback(); getObject().getMaxFlightRadiusLimitationEnabled(cc); return cc; }
And then compile the library new...
Alternatively you can probably use JavaObject to call this Methods from the Flightcontroller...
but DjiFlightcontrollerWrapper.java is never used in the drone program
Private controller As DJIFlightController
@ShortName("DJIFlightController")
it's not compiling for me. see the previous postNo need to add any other methods to disable the flight limits.
Start with a new project based on the example. If it crashes then please post the logs.
False. It is used as it is one of the Basecomponents needed to fly the Drone.....B4X:Private controller As DJIFlightController
From DjiFlightControllerWrapper.java
B4X:@ShortName("DJIFlightController")
Note that it is the FlightController where all these Informations are coming from:
Have you added the missing event sub then?I get a message SDK_ActivationStateChanged not found.
Have you added the missing event sub then?
Start with DroneMission example.