Please select Into the mobile phone version | Continue to access the computer ver.
How to set aircraft LED settings?
125 2 2020-12-22
Uploading and Loding Picture ...(0/1)
o(^-^)o
Super pilot
lvl.4
Flight distance : 174905 ft
Russia
Offline

How to set aircraft LED settings using the method
- (void) setLEDsEnabledSettings: (DJIFlightControllerLEDsSettings *) ledsSettings withCompletion: (DJICompletionBlock) completion
if the properties (frontLEDsOn, rearLEDsOn, beaconOn, statusIndicatorOn) of the DJIFlightControllerLEDsSettings object have read-only permission?

2020-12-22
Use props
hdrpano
lvl.4
Flight distance : 446060 ft
  • >>>
Switzerland
Offline

I use this code with Swift. Works fine.

    //MARK:- Front LEDs On Off
    func frontLed(frontLEDs: Bool) {
        let FC = self.fetchFlightController()
        if FC != nil {
            let led: DJIMutableFlightControllerLEDsSettings = DJIMutableFlightControllerLEDsSettings.init()
            led.frontLEDsOn = frontLEDs
            FC?.setLEDsEnabledSettings(led, withCompletion: { (error: Error?) in
                if error != nil {
                    NSLog("Error set front Led \(frontLEDs)")
                } else {
                    NSLog("Set front Led \(frontLEDs)")
                }
            })
        }
    }
2020-12-30
Use props
Super pilot
lvl.4
Flight distance : 174905 ft
Russia
Offline

hdrpano Posted at 12-30 09:21
I use this code with Swift. Works fine.

    //MARK:- Front LEDs On Off

Thank you! I tried to change the frontLEDsOn in the DJIFlightControllerLEDsSettings object, but it was necessary in DJIMutableFlightControllerLEDsSettings. My mistake. Happy New Year!
2020-12-31
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules