wangmengmeng
2025-04-26 96250617dbbefce55b5966c94880e2b07b6c98df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.dji.sample.manage.model.receiver;
 
import com.dji.sdk.cloudapi.device.OsdDockDrone;
import com.dji.sdk.cloudapi.device.SwitchActionEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
 
import java.util.Objects;
 
/**
 * @author sean
 * @version 1.3
 * @date 2022/11/25
 */
public class NightLightsStateReceiver extends BasicDeviceProperty {
 
    private SwitchActionEnum nightLightsState;
 
    @JsonCreator
    public NightLightsStateReceiver(Integer nightLightsState) {
        this.nightLightsState = SwitchActionEnum.find(nightLightsState);
    }
 
    @Override
    public boolean valid() {
        return Objects.nonNull(nightLightsState);
    }
 
    @Override
    public boolean canPublish(OsdDockDrone osd) {
        return nightLightsState != osd.getNightLightsState();
    }
}