M300 how to listen to the state of batteries?
364 1 2020-12-16
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_kIFd1YLbS2Ke
lvl.1

China
Offline

IOS SDK:
use_frameworks!
pod 'DJI-SDK-iOS','~> 4.13.1'
pod 'DJI-UXSDK-iOS', '~> 4.13'
pod 'DJIWidget', '~> 1.6.3'

and with following codes:
[[[RACObserve(self.aircraft, batteries) ignore:nil] take:1] subscribeNext:^(NSArray *batteries) {
        @strongify(self);

        NSInteger count = batteries.count;
        for (int i = 0; i < count; i ++) {
            DJIBattery *battery = batteries[i];
            battery.delegate = self;
        }

    }];
}

but, I find that when drone connected, self.aircraft.batteries is always null!

Is there anyother way to listen to the state of batteris for M300 RTK?

2020-12-16
Use props
djiuser_kIFd1YLbS2Ke
lvl.1

China
Offline

It is ok now。
2020-12-17
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules