[wpilib] Remove PWM.Period enum

Replace it with just numeric values.
This commit is contained in:
Peter Johnson
2026-03-20 22:53:26 -07:00
parent f2929af00f
commit d05d3b1c78
30 changed files with 51 additions and 92 deletions

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class Koors40 extends PWMMotorController {
super("Koors40", channel);
setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k20Ms);
m_pwm.setOutputPeriod(20);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "Koors40");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class PWMSparkFlex extends PWMMotorController {
super("PWMSparkFlex", channel);
setBoundsMicroseconds(2003, 1550, 1500, 1460, 999);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "RevSparkFlexPWM");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class PWMSparkMax extends PWMMotorController {
super("PWMSparkMax", channel);
setBoundsMicroseconds(2003, 1550, 1500, 1460, 999);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "RevSparkMaxPWM");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class PWMTalonFX extends PWMMotorController {
super("PWMTalonFX", channel);
setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "TalonFX");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class PWMTalonSRX extends PWMMotorController {
super("PWMTalonSRX", channel);
setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "PWMTalonSRX");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class PWMVenom extends PWMMotorController {
super("PWMVenom", channel);
setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "FusionVenom");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class PWMVictorSPX extends PWMMotorController {
super("PWMVictorSPX", channel);
setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "PWMVictorSPX");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class Spark extends PWMMotorController {
super("Spark", channel);
setBoundsMicroseconds(2003, 1550, 1500, 1460, 999);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "RevSPARK");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class SparkMini extends PWMMotorController {
super("SparkMini", channel);
setBoundsMicroseconds(2500, 1510, 1500, 1490, 500);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "RevSPARK");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class Talon extends PWMMotorController {
super("Talon", channel);
setBoundsMicroseconds(2037, 1539, 1513, 1487, 989);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "Talon");

View File

@@ -6,7 +6,6 @@
package org.wpilib.hardware.motor;
import org.wpilib.hardware.discrete.PWM;
import org.wpilib.hardware.hal.HAL;
/**
@@ -37,7 +36,7 @@ public class VictorSP extends PWMMotorController {
super("VictorSP", channel);
setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
m_pwm.setOutputPeriod(5);
setDutyCycle(0.0);
HAL.reportUsage("IO", getChannel(), "VictorSP");