Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
matrix:
os: ["ubuntu-22.04", "macos-14", "windows-2022"]
python_version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'

steps:
- uses: actions/checkout@v5
Expand All @@ -37,7 +37,7 @@ jobs:
python-version: ${{ matrix.python_version }}
- name: Install deps
run: |
pip install 'robotpy[commands2,romi]<2026.0.0,>=2025.0.0b3' numpy pytest
pip install 'robotpy[commands2,romi]<2027,>=2026.1.1' numpy pytest
- name: Run tests
run: bash run_tests.sh
shell: bash
6 changes: 3 additions & 3 deletions Physics/src/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def robotInit(self):
self.lstick = wpilib.Joystick(0)
self.rstick = wpilib.Joystick(1)

self.l_motor = wpilib.Jaguar(1)
self.r_motor = wpilib.Jaguar(2)
self.l_motor = wpilib.PWMSparkMax(1)
self.r_motor = wpilib.PWMSparkMax(2)

# Position gets automatically updated as robot moves
self.gyro = wpilib.AnalogGyro(1)

self.drive = wpilib.drive.DifferentialDrive(self.l_motor, self.r_motor)

self.motor = wpilib.Jaguar(4)
self.motor = wpilib.PWMSparkMax(4)

self.limit1 = wpilib.DigitalInput(1)
self.limit2 = wpilib.DigitalInput(2)
Expand Down
8 changes: 4 additions & 4 deletions Physics4Wheel/src/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def robotInit(self):
self.rstick = wpilib.Joystick(1)

# Define front and rear motors
self.lf_motor = wpilib.Jaguar(1)
self.lr_motor = wpilib.Jaguar(2)
self.rf_motor = wpilib.Jaguar(3)
self.rr_motor = wpilib.Jaguar(4)
self.lf_motor = wpilib.PWMSparkMax(1)
self.lr_motor = wpilib.PWMSparkMax(2)
self.rf_motor = wpilib.PWMSparkMax(3)
self.rr_motor = wpilib.PWMSparkMax(4)

# add the followers to the left and right motors
self.lf_motor.addFollower(self.lr_motor)
Expand Down
6 changes: 3 additions & 3 deletions PhysicsSPI/src/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def robotInit(self):
self.lstick = wpilib.Joystick(0)
self.rstick = wpilib.Joystick(1)

self.l_motor = wpilib.Jaguar(1)
self.r_motor = wpilib.Jaguar(2)
self.l_motor = wpilib.PWMSparkMax(1)
self.r_motor = wpilib.PWMSparkMax(2)

# Position gets automatically updated as robot moves
self.gyro = wpilib.ADXRS450_Gyro()

self.drive = wpilib.drive.DifferentialDrive(self.l_motor, self.r_motor)

self.motor = wpilib.Jaguar(4)
self.motor = wpilib.PWMSparkMax(4)

self.limit1 = wpilib.DigitalInput(1)
self.limit2 = wpilib.DigitalInput(2)
Expand Down
2 changes: 1 addition & 1 deletion StateSpaceFlywheelSysId/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ def teleopPeriodic(self) -> None:
# Send the new calculated voltage to the motors.
# voltage = duty cycle * battery voltage, so
# duty cycle = voltage / battery voltage
nextVoltage = self.loop.U()
nextVoltage = self.loop.U()[0]
self.motor.setVoltage(nextVoltage)