mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpilib] Pregenerate PWM motor controllers (#6742)
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/DMC60.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/DMC60.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Digilent DMC 60 Motor Controller.
|
||||
*
|
||||
* <p>Note that the DMC 60 uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the DMC 60 User Manual available from
|
||||
* Digilent.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class DMC60 extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the DMC 60 is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DMC60(final int channel) {
|
||||
super("DMC60", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_DigilentDMC60, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Jaguar.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Jaguar.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Luminary Micro / Vex Robotics Jaguar Motor Controller.
|
||||
*
|
||||
* <p>Note that the Jaguar uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Jaguar User Manual available from
|
||||
* Luminary Micro / Vex Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.310ms = full "forward"
|
||||
* <li>1.550ms = the "high end" of the deadband range
|
||||
* <li>1.507ms = center of the deadband range (off)
|
||||
* <li>1.454ms = the "low end" of the deadband range
|
||||
* <li>0.697ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class Jaguar extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Jaguar is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Jaguar(final int channel) {
|
||||
super("Jaguar", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2310, 1550, 1507, 1454, 697);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_Jaguar, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMSparkFlex.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMSparkFlex.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* REV Robotics SPARK Flex Motor Controller.
|
||||
*
|
||||
* <p>Note that the SPARK Flex uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the SPARK Flex User Manual available from
|
||||
* REV Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.003ms = full "forward"
|
||||
* <li>1.550ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.460ms = the "low end" of the deadband range
|
||||
* <li>0.999ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class PWMSparkFlex extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the SPARK Flex is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PWMSparkFlex(final int channel) {
|
||||
super("PWMSparkFlex", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2003, 1550, 1500, 1460, 999);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_RevSparkFlexPWM, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMSparkMax.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMSparkMax.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* REV Robotics SPARK MAX Motor Controller.
|
||||
*
|
||||
* <p>Note that the SPARK MAX uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the SPARK MAX User Manual available from
|
||||
* REV Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.003ms = full "forward"
|
||||
* <li>1.550ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.460ms = the "low end" of the deadband range
|
||||
* <li>0.999ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class PWMSparkMax extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the SPARK MAX is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PWMSparkMax(final int channel) {
|
||||
super("PWMSparkMax", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2003, 1550, 1500, 1460, 999);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_RevSparkMaxPWM, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMTalonFX.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMTalonFX.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) Talon FX Motor Controller.
|
||||
*
|
||||
* <p>Note that the Talon FX uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Talon FX User Manual available from
|
||||
* Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class PWMTalonFX extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Talon FX is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PWMTalonFX(final int channel) {
|
||||
super("PWMTalonFX", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_TalonFX, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMTalonSRX.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMTalonSRX.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) Talon SRX Motor Controller.
|
||||
*
|
||||
* <p>Note that the Talon SRX uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Talon SRX User Manual available from
|
||||
* Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class PWMTalonSRX extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Talon SRX is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PWMTalonSRX(final int channel) {
|
||||
super("PWMTalonSRX", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_PWMTalonSRX, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMVenom.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMVenom.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Playing with Fusion Venom Motor Controller.
|
||||
*
|
||||
* <p>Note that the Venom uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Venom User Manual available from
|
||||
* Playing with Fusion.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class PWMVenom extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Venom is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PWMVenom(final int channel) {
|
||||
super("PWMVenom", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_FusionVenom, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMVictorSPX.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMVictorSPX.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) Victor SPX Motor Controller.
|
||||
*
|
||||
* <p>Note that the Victor SPX uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Victor SPX User Manual available from
|
||||
* Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class PWMVictorSPX extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Victor SPX is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PWMVictorSPX(final int channel) {
|
||||
super("PWMVictorSPX", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_PWMVictorSPX, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/SD540.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/SD540.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Mindsensors SD540 Motor Controller.
|
||||
*
|
||||
* <p>Note that the SD540 uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the SD540 User Manual available from
|
||||
* Mindsensors.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.050ms = full "forward"
|
||||
* <li>1.550ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.440ms = the "low end" of the deadband range
|
||||
* <li>0.940ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class SD540 extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the SD540 is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public SD540(final int channel) {
|
||||
super("SD540", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2050, 1550, 1500, 1440, 940);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_MindsensorsSD540, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Spark.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Spark.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* REV Robotics SPARK Motor Controller.
|
||||
*
|
||||
* <p>Note that the SPARK uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the SPARK User Manual available from
|
||||
* REV Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.003ms = full "forward"
|
||||
* <li>1.550ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.460ms = the "low end" of the deadband range
|
||||
* <li>0.999ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class Spark extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the SPARK is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Spark(final int channel) {
|
||||
super("Spark", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2003, 1550, 1500, 1460, 999);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_RevSPARK, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Talon.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Talon.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) Talon Motor Controller.
|
||||
*
|
||||
* <p>Note that the Talon uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Talon User Manual available from
|
||||
* Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.037ms = full "forward"
|
||||
* <li>1.539ms = the "high end" of the deadband range
|
||||
* <li>1.513ms = center of the deadband range (off)
|
||||
* <li>1.487ms = the "low end" of the deadband range
|
||||
* <li>0.989ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class Talon extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Talon is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Talon(final int channel) {
|
||||
super("Talon", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2037, 1539, 1513, 1487, 989);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_Talon, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Victor.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/Victor.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Vex Robotics Victor 888 Motor Controller.
|
||||
*
|
||||
* <p>Note that the Victor 888 uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Victor 888 User Manual available from
|
||||
* Vex Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.027ms = full "forward"
|
||||
* <li>1.525ms = the "high end" of the deadband range
|
||||
* <li>1.507ms = center of the deadband range (off)
|
||||
* <li>1.490ms = the "low end" of the deadband range
|
||||
* <li>1.026ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class Victor extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Victor 888 is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Victor(final int channel) {
|
||||
super("Victor", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2027, 1525, 1507, 1490, 1026);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k2X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_Victor, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/VictorSP.java
generated
Normal file
48
wpilibj/src/generated/main/java/edu/wpi/first/wpilibj/motorcontrol/VictorSP.java
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Vex Robotics Victor SP Motor Controller.
|
||||
*
|
||||
* <p>Note that the Victor SP uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Victor SP User Manual available from
|
||||
* Vex Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class VictorSP extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Victor SP is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public VictorSP(final int channel) {
|
||||
super("VictorSP", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_VictorSP, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user