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