diff --git a/python/VelocityClosedLoop/tests/pyfrc_test.py b/python/VelocityClosedLoop/tests/pyfrc_test.py index 8413a739..7f485ea0 100644 --- a/python/VelocityClosedLoop/tests/pyfrc_test.py +++ b/python/VelocityClosedLoop/tests/pyfrc_test.py @@ -5,7 +5,7 @@ from time import sleep from pyfrc.tests import * -from phoenix6 import hardware, configs, controls +from phoenix6 import hardware, configs, controls, signals from phoenix6.unmanaged import feed_enable from wpilib.simulation import DCMotorSim from wpimath.system.plant import DCMotor @@ -28,6 +28,8 @@ def wait_with_sim(time: float, fx: hardware.TalonFX, dcmotorsim: DCMotorSim): feed_enable(0.1) start_time += LOOP_PERIOD + assert fx.get_device_enable().value == signals.DeviceEnableValue.ENABLED + dcmotorsim.setInputVoltage(fx.sim_state.motor_voltage) dcmotorsim.update(LOOP_PERIOD) fx.sim_state.set_raw_rotor_position(radiansToRotations(dcmotorsim.getAngularPosition()))