[hal, wpilib] PWM Rewrite (#7845)

The HAL will only contain the output period and the raw microseconds. Higher level things such as SimDevice can handle everything else.
This commit is contained in:
Thad House
2025-03-20 19:23:22 -07:00
committed by GitHub
parent 2e21a41f87
commit e2cc9e0059
96 changed files with 1037 additions and 2453 deletions

View File

@@ -15,9 +15,8 @@ import edu.wpi.first.wpilibj.motorcontrol.PWMMotorController;
public class RomiMotor extends PWMMotorController {
/** Common initialization code called by all constructors. */
protected final void initRomiMotor() {
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
m_pwm.setSpeed(0.0);
m_pwm.setZeroLatch();
m_pwm.setOutputPeriod(PWM.OutputPeriod.k5Ms);
setSpeed(0.0);
}
/**

View File

@@ -7,7 +7,6 @@
using namespace frc;
RomiMotor::RomiMotor(int channel) : PWMMotorController("Romi Motor", channel) {
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
m_pwm.SetSpeed(0.0);
m_pwm.SetZeroLatch();
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
}