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
package com.dji.sdk.cloudapi.debug;
 
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.7
 * @date 2023/6/29
 */
public enum RemoteDebugStepKeyEnum {
 
    GET_BID("get_bid", "Get bid"),
 
    UPGRADING_PREVENT_REBOOT("upgrading_prevent_reboot", "Check if the device is being updated"),
 
    CHECK_WORK_MODE("check_work_mode", "Check whether to enter remote debugging mode"),
 
    CHECK_TASK_STATE("check_task_state", "Check if the DJI Dock is free"),
 
    LAND_MCU_REBOOT("land_mcu_reboot", "Land MCU reboot"),
 
    RAIN_MCU_REBOOT("rain_mcu_reboot", "Weather station MCU reboot"),
 
    CORE_MCU_REBOOT("core_mcu_reboot", "Central control MCU reboot"),
 
    SDR_REBOOT("sdr_reboot", "SDR reboot"),
 
    WRITE_REBOOT_PARAM_FILE("write_reboot_param_file", "Write reboot flag"),
 
    GET_DRONE_POWER_STATE("get_drone_power_state", "Get battery charge state"),
 
    CLOSE_PUTTER("close_putter", "Close the putter"),
 
    CHECK_WIRED_CONNECT_STATE("check_wired_connect_state", "Get aircraft state"),
 
    OPEN_DRONE("open_drone", "Open the plane"),
 
    OPEN_ALARM("open_alarm", "Open sound and light alarm"),
 
    CHECK_SCRAM_STATE("check_scram_state", "Check if the emergency stop switch is pressed"),
 
    OPEN_COVER("open_cover", "Open the hatch"),
 
    CHECK_DRONE_SDR_CONNECT_STATE("check_drone_sdr_connect_state", "Establish SDR wireless connection"),
 
    TURN_ON_DRONE("turn_on_drone", "Turn the plane on"),
 
    DRONE_PADDLE_FORWARD("drone_paddle_forward", "Turn on forward paddle"),
 
    CLOSE_COVER("close_cover", "Close the hatch"),
 
    DRONE_PADDLE_REVERSE("drone_paddle_reverse", "Turn on reverse paddle"),
 
    DRONE_PADDLE_STOP("drone_paddle_stop", "Stop Paddle Rotation"),
 
    FREE_PUTTER("free_putter", "Free Putter"),
 
    STOP_CHARGE("stop_charge", "Stop charging");
 
    private final String stepKey;
 
    private final String message;
 
    RemoteDebugStepKeyEnum(String stepKey, String message) {
        this.stepKey = stepKey;
        this.message = message;
    }
 
    @JsonValue
    public String getStepKey() {
        return stepKey;
    }
 
    public String getMessage() {
        return message;
    }
 
    @JsonCreator
    public static RemoteDebugStepKeyEnum find(String stepKey) {
        return Arrays.stream(values()).filter(stepKeyEnum -> stepKeyEnum.stepKey.equals(stepKey)).findAny()
            .orElseThrow(() -> new CloudSDKException(RemoteDebugStepKeyEnum.class,stepKey));
    }
 
}