- $ cd PhantomBleBridge
- $ sudo gem install cocoapods
- $ pod repo update
- $ pod install
- dji developer https://developer.dji.com/
- create app
- open PhantomBleBridge from xcode
- Xcodeproject -> General -> Signing
- Xcodeproject -> General -> Identifier -> Bundle Identifier
- Info.plist -> DJISDKAppKey
- fw update (aircraft and propo)
- asp mode f(p3) p(p4)
DJISDKManager.startConnectionToProduct()
DJISDKManager.stopConnectionToProduct()
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.turnOnMotorsWithCompletion()
}
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.turnOffMotorsWithCompletion()
}
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.startTakeoffWithCompletion()
}
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.startLandingWithCompletion()
}
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.startGoHomeWithCompletion()
}
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.cancelGoHomeWithCompletion()
}
if let aircraft = DJISDKManager.product() as? DJIAircraft {
aircraft.flightController.setVirtualStickModeEnabled(true)
if aircraft.flightController.isVirtualStickControlModeAvailable() {
# 秒単位での操作?
# Filter the angle between -180 ~ 0, 0 ~ 180
DJIVirtualStickFlightControlData data;
data.pitch = 0
data.roll = 0
data.yaw = 180
data.verticalThrottle = 0
aircraft.sendVirtualStickFlightControlData(data)
}
}
TODO: https://developer.dji.com/mobile-sdk/documentation/ios-tutorials/SimulatorDemo.html
TODO:
-
[Bridge App](https://github.com/dji-sdk/iOS-Bridge-App https://developer.dji.com/mobile-sdk/documentation/ios-tutorials/BridgeAppDemo.html) iOS二台必要
-
Simulator winでp3は可能、macはp4やSpark,Mavicに対応。