package com.djhk.uav.uav.enums;

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

import java.util.Arrays;

/**
 * @author sean
 * @version 1.4
 * @date 2023/3/15
 */
public enum SyunWaylineRcLostActionEnum {

    CONTINUE_WAYLINE, EXECUTE_RC_LOST_ACTION;

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

    @JsonCreator
    public static SyunWaylineRcLostActionEnum find(int val) {
        return Arrays.stream(values()).filter(lostActionEnum -> lostActionEnum.ordinal() == val).findAny().get();
    }
}
