001package com.ctre.phoenix.sensors;
002
003/** Enumerated type for control frame types. */
004public enum PigeonIMU_ControlFrame {
005        /**
006         * Control
007         */
008        Control_1(0x00042800);
009
010        /**
011         * Value of control frame
012         */
013        public final int value;
014
015        /**
016         * Create a PigeonIMU_ControlFrame of initValue
017         * @param initValue value of Control Frame
018         */
019        PigeonIMU_ControlFrame(int initValue) {
020                this.value = initValue;
021        }
022
023        /**
024         * Int to enum cast
025         * @param value value of control frame
026         * @return PigeonIMU_ControlFrame of specified value
027         */
028        public static PigeonIMU_ControlFrame valueOf(int value) {
029                for (PigeonIMU_ControlFrame mode : values()) {
030                        if (mode.value == value) {
031                                return mode;
032                        }
033                }
034                return null;
035        }
036}