001/* Copyright (C) Cross The Road Electronics 2024 */ 002package com.ctre.phoenix.motorcontrol; 003 004/** 005 * Choose the control mode for a motor controller. Consult product-specific documentation to determine what is available/supported for your device. 006 */ 007public enum ControlMode 008{ 009 /** 010 * Percent output [-1,1] 011 */ 012 PercentOutput(0), 013 /** 014 * Position closed loop 015 */ 016 Position(1), 017 /** 018 * Velocity closed loop 019 */ 020 Velocity(2), 021 /** 022 * Input current closed loop 023 */ 024 Current(3), 025 /** 026 * Follow other motor controller 027 */ 028 Follower(5), 029 /** 030 * Motion Profile 031 */ 032 MotionProfile(6), 033 /** 034 * Motion Magic 035 */ 036 MotionMagic(7), 037 /** 038 * Motion Profile with auxiliary output 039 */ 040 MotionProfileArc(10), 041 /** 042 * Plays a single tone. Frequency (hz) is passed into set. 043 */ 044 MusicTone(13), 045 046 /** 047 * Disable Motor Controller 048 */ 049 Disabled(15); 050 051 /** 052 * Value of control mode 053 */ 054 public final int value; 055 056 /** 057 * Create ControlMode of initValue 058 * @param initValue Value of ControlMode 059 */ 060 ControlMode(int initValue) 061 { 062 this.value = initValue; 063 } 064};