Skip to content

Commit

Permalink
try to fix tests in CI
Browse files Browse the repository at this point in the history
They work locally, but not in CI
  • Loading branch information
bhall-ctre committed May 29, 2024
1 parent 1cbe9f1 commit 5cdc4a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/VelocityClosedLoop/tests/pyfrc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()))
Expand Down

0 comments on commit 5cdc4a8

Please sign in to comment.