package com.djhk.uav.uav.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

import java.util.Arrays;

/**
 * @author jiachengshuai
 * @version 1.4
 * @date 2023/3/13
 */
public enum SyunGimbalResetModeEnum {

    RECENTER, DOWN, RECENTER_PAN, PITCH_DOWN;

    @JsonValue
    public int getVal() {
        return ordinal();
    }

    @JsonCreator
    public static SyunGimbalResetModeEnum find(int value) {
        return Arrays.stream(values()).filter(resetModeEnum -> resetModeEnum.ordinal() == value).findAny().get();
    }
}
