无人机经纬度获取为NaN,救救孩子
0
private void upFlightControl() {
if (ModuleVerificationUtil.isFlightControllerAvailable()) {
FlightController flightController =
((Aircraft) OwspaceApplication.getProductInstance()).getFlightController();
flightController.setStateCallback(new FlightControllerState.Callback() {
@Override
public void onUpdate(@NonNull FlightControllerState djiFlightControllerCurrentState) {
if (null != compass) {
droneLocationLat = djiFlightControllerCurrentState.getAircraftLocation().getLongitude();
DJIMainActivity.this.runOnUiThread(new Runnable() {
public void run() {
test.setText(" "+droneLocationLat);
}
});
}
}
});
if (ModuleVerificationUtil.isCompassAvailable()) {
compass = flightController.getCompass();
}
}
}
droneLocationLat获取为NAN
|
|
|
|