mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user