001package com.ctre.phoenix.sensors;
002
003/**
004 * Enumerated types for frame rate ms.
005 */
006public enum PigeonIMU_StatusFrame {
007        /**
008         * General Status of Pigeon
009         */
010        CondStatus_1_General(0x042000),
011        /**
012         * Yaw Pitch Roll information from Pigeon 
013         */ 
014        CondStatus_9_SixDeg_YPR(0x042200), 
015        /**
016         * 9-Axis fused value
017         */
018        CondStatus_6_SensorFusion(0x042140), 
019        /**
020         * Accumulated Gyro information from Pigeon
021         */
022        CondStatus_11_GyroAccum(0x042280), 
023        /**
024         * General Compass information from Pigeon
025         */
026        CondStatus_2_GeneralCompass(0x042040), 
027        /**
028         * General Accelerometer information from Pigeon
029         */
030        CondStatus_3_GeneralAccel(0x042080), 
031        /**
032         * Quaternion value information from Pigeon
033         */
034        CondStatus_10_SixDeg_Quat(0x042240), 
035        /**
036         * Raw Magnetometer information from Pigeon
037         */
038        RawStatus_4_Mag(0x041CC0), 
039        /**
040         * Biased Gyro information from Pigeon
041         */
042        BiasedStatus_2_Gyro(0x041C40), 
043        /**
044         * Biased Magnetometer information from Pigeon
045         */
046        BiasedStatus_4_Mag(0x041CC0), 
047        /**
048         * Biased Accelerometer information from Pigeon
049         */
050        BiasedStatus_6_Accel(0x41D40);
051
052        /**
053         * value of Status frame
054         */
055        public final int value;
056
057        /**
058         * Create status frame of initValue
059         * @param initValue value of status frame
060         */
061        PigeonIMU_StatusFrame(int initValue) {
062                this.value = initValue;
063        }
064
065        /**
066         * Get StatusFrame of specified value
067         * @param value value of status frame
068         * @return PigeonIMU_StatusFrame of specified value
069         */
070        public static PigeonIMU_StatusFrame valueOf(int value) {
071                for (PigeonIMU_StatusFrame mode : values()) {
072                        if (mode.value == value) {
073                                return mode;
074                        }
075                }
076                return null;
077        }
078}