001/* Copyright (C) Cross The Road Electronics 2024 */ 002package com.ctre.phoenix; 003 004/** 005 * Control Frames for CANifier 006 */ 007public enum CANifierControlFrame { 008 /** 009 * CANifier General control 010 */ 011 Control_1_General(0x040000), 012 /** 013 * CANifier PWM outputs 014 */ 015 Control_2_PwmOutput(0x040040); 016 017 /** 018 * CANifier Control Frame of specified value 019 * @param value Value of CANifier Control Frame 020 * @return CANifier control frame of specified value 021 */ 022 public static CANifierControlFrame valueOf(int value) { 023 for (CANifierControlFrame frame : values()) { 024 if (frame.value == value) { 025 return frame; 026 } 027 } 028 return null; 029 } 030 031 /** 032 * Value of CANifier control frame 033 */ 034 public final int value; 035 036 /** 037 * Create CANifier control frame of initValue 038 * @param initValue CANifier Control Frame value 039 */ 040 CANifierControlFrame(int initValue) { 041 this.value = initValue; 042 } 043}