wangmengmeng
2024-12-24 24432a361d5c6bd6f3d8c008693e9f1155d62517
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package com.dji.sdk.cloudapi.control;
 
import com.dji.sdk.exception.CloudSDKException;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
 
import java.util.Arrays;
 
/**
 * @author sean
 * @version 1.9
 * @date 2023/12/12
 */
public enum ExposureValueEnum {
 
    MINUS_5_DOT_0(1, "-5.0EV"),
 
    MINUS_4_DOT_7(2, "-4.7EV"),
 
    MINUS_4_DOT_3(3, "-4.3EV"),
 
    MINUS_4_DOT_0(4, "-4.0EV"),
 
    MINUS_3_DOT_7(5, "-3.7EV"),
 
    MINUS_3_DOT_3(6, "-3.3EV"),
 
    MINUS_3_DOT_0(7, "-3.0EV"),
 
    MINUS_2_DOT_7(8, "-2.7EV"),
 
    MINUS_2_DOT_3(9, "-2.3EV"),
 
    MINUS_2_DOT_0(10, "-2.0EV"),
 
    MINUS_1_DOT_7(11, "-1.7EV"),
 
    MINUS_1_DOT_3(12, "-1.3EV"),
 
    MINUS_1_DOT_0(13, "-1.0EV"),
 
    MINUS_0_DOT_7(14, "-0.7EV"),
 
    MINUS_0_DOT_3(15, "-0.3EV"),
 
    _0(16, "0EV"),
 
    _0_DOT_3(17, "0.3EV"),
 
    _0_DOT_7(18, "0.7EV"),
 
    _1_DOT_0(19, "1.0EV"),
 
    _1_DOT_3(20, "1.3EV"),
 
    _1_DOT_7(21, "1.7EV"),
 
    _2_DOT_0(22, "2.0EV"),
 
    _2_DOT_3(23, "2.3EV"),
 
    _2_DOT_7(24, "2.7EV"),
 
    _3_DOT_0(25, "3.0EV"),
 
    _3_DOT_3(26, "3.3EV"),
 
    _3_DOT_7(27, "3.7EV"),
 
    _4_DOT_0(28, "4.0EV"),
 
    _4_DOT_3(29, "4.3EV"),
 
    _4_DOT_7(30, "4.7EV"),
 
    _5_DOT_0(31, "5.0EV"),
 
    FIXED(255, "FIXED"),
 
    ;
 
 
    private final int value;
 
    private final String desc;
 
    ExposureValueEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }
 
    @JsonValue
    public int getValue() {
        return value;
    }
 
    public String getDesc() {
        return desc;
    }
 
    @JsonCreator
    public static ExposureValueEnum find(int value) {
        return Arrays.stream(values()).filter(valueEnum -> valueEnum.value == value).findAny()
            .orElseThrow(() -> new CloudSDKException(ExposureValueEnum.class, value));
    }
 
}