Skip to content

Commit ef74e9d

Browse files
committed
Update to initial 2027 alpha
1 parent b878ecc commit ef74e9d

File tree

21 files changed

+349
-28
lines changed

21 files changed

+349
-28
lines changed

.github/workflows/dist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ on:
66
push:
77
branches:
88
- main
9+
- '2027'
910
tags:
1011
- '*'
1112

1213
jobs:
1314
ci:
14-
uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2025
15+
uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2027
1516
with:
1617
artifactory_repo_type: vendor
1718
enable_raspbian: false

examples/can-arcade-drive/robot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def robotInit(self):
2525
#
2626
# The example below initializes four brushless motors with CAN IDs
2727
# 1, 2, 3, 4. Change these parameters to match your setup
28-
self.leftLeadMotor = rev.SparkMax(1, rev.SparkMax.MotorType.kBrushless)
29-
self.rightLeadMotor = rev.SparkMax(3, rev.SparkMax.MotorType.kBrushless)
30-
self.leftFollowMotor = rev.SparkMax(2, rev.SparkMax.MotorType.kBrushless)
31-
self.rightFollowMotor = rev.SparkMax(4, rev.SparkMax.MotorType.kBrushless)
28+
self.leftLeadMotor = rev.SparkMax(0, 1, rev.SparkMax.MotorType.kBrushless)
29+
self.rightLeadMotor = rev.SparkMax(0, 3, rev.SparkMax.MotorType.kBrushless)
30+
self.leftFollowMotor = rev.SparkMax(0, 2, rev.SparkMax.MotorType.kBrushless)
31+
self.rightFollowMotor = rev.SparkMax(0, 4, rev.SparkMax.MotorType.kBrushless)
3232

3333
# Passing in the lead motors into DifferentialDrive allows any
3434
# commmands sent to the lead motors to be sent to the follower motors.

examples/can-tank-drive/robot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def robotInit(self):
2525
#
2626
# The example below initializes two brushless motors with CAN IDs
2727
# 1 and 2. Change these parameters to match your setup
28-
self.leftMotor = rev.SparkMax(1, rev.SparkMax.MotorType.kBrushless)
29-
self.rightMotor = rev.SparkMax(2, rev.SparkMax.MotorType.kBrushless)
28+
self.leftMotor = rev.SparkMax(0, 1, rev.SparkMax.MotorType.kBrushless)
29+
self.rightMotor = rev.SparkMax(0, 2, rev.SparkMax.MotorType.kBrushless)
3030

3131
# Configure for factory defaults and invert right side motor
3232
self.globalConfig = rev.SparkMaxConfig()

examples/color_match/robot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MyRobot(wpilib.TimedRobot):
1616
"""
1717

1818
def robotInit(self):
19-
self.colorSensor = ColorSensorV3(wpilib.I2C.Port.kOnboard)
19+
self.colorSensor = ColorSensorV3(wpilib.I2C.Port.kPort0)
2020

2121
# A Rev Color Match object is used to register and detect known colors. This can
2222
# be calibrated ahead of time or during operation.

examples/get-set-params/robot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class Robot(wpilib.TimedRobot):
1313
def robotInit(self):
1414
# Create motor
15-
self.motor = rev.CANSparkMax(1, rev.CANSparkMax.MotorType.kBrushless)
15+
self.motor = rev.CANSparkMax(0, 1, rev.CANSparkMax.MotorType.kBrushless)
1616

1717
self.joystick = wpilib.Joystick(0)
1818

examples/getting-started/robot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def robotInit(self):
1616
This function is called upon program startup and
1717
should be used for any initialization code.
1818
"""
19-
self.leftDrive = rev.SparkMax(1, rev.SparkMax.MotorType.kBrushless)
20-
self.rightDrive = rev.SparkMax(2, rev.SparkMax.MotorType.kBrushless)
19+
self.leftDrive = rev.SparkMax(0, 1, rev.SparkMax.MotorType.kBrushless)
20+
self.rightDrive = rev.SparkMax(0, 2, rev.SparkMax.MotorType.kBrushless)
2121
self.robotDrive = wpilib.drive.DifferentialDrive(
2222
self.leftDrive, self.rightDrive
2323
)

examples/limit-switch/robot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class Robot(wpilib.TimedRobot):
1717
def robotInit(self):
1818
# Create motor
19-
self.motor = rev.SparkMax(1, rev.SparkMax.MotorType.kBrushless)
19+
self.motor = rev.SparkMax(0, 1, rev.SparkMax.MotorType.kBrushless)
2020

2121
self.joystick = wpilib.Joystick(0)
2222

examples/read_rgb_values/robot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MyRobot(wpilib.TimedRobot):
1616
"""
1717

1818
def robotInit(self):
19-
self.colorSensor = ColorSensorV3(wpilib.I2C.Port.kOnboard)
19+
self.colorSensor = ColorSensorV3(wpilib.I2C.Port.kPort0)
2020

2121
def robotPeriodic(self):
2222
# The method getColor() returns a normalized color value from the sensor and can be

pyproject.toml

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ build-backend = "hatchling.build"
33
requires = [
44
"hatchling",
55
"hatch-vcs",
6-
"semiwrap~=0.1",
6+
"semiwrap~=0.1.4",
77
"hatch-meson~=0.1.0b2",
8-
"hatch-robotpy~=0.2.0",
9-
"wpilib~=2025.3.2.2",
8+
"hatch-robotpy~=0.2.1",
9+
"wpilib~=2027.0.0a2",
1010
]
1111

1212

@@ -16,15 +16,15 @@ dynamic = ["version"]
1616
description = "REVLib for RobotPy"
1717
license = "BSD-3-Clause"
1818
dependencies = [
19-
"wpilib~=2025.3.2.2",
19+
"wpilib~=2027.0.0a2",
2020
]
2121

2222
[[project.authors]]
2323
name = "RobotPy Development Team"
2424
2525

2626
[project.urls]
27-
"Source code" = "https://github.com/robotpy/robotpy-ctre"
27+
"Source code" = "https://github.com/robotpy/robotpy-rev"
2828

2929

3030
[tool.hatch.version]
@@ -44,15 +44,15 @@ packages = ["rev"]
4444
artifact_id = "REVLib-cpp"
4545
group_id = "com.revrobotics.frc"
4646
repo_url = "https://maven.revrobotics.com"
47-
version = "2025.0.3"
47+
version = "2027.0.0-alpha-1"
4848
staticlibs = ["REVLib"]
4949
extract_to = "lib"
5050

5151
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
5252
artifact_id = "REVLib-driver"
5353
group_id = "com.revrobotics.frc"
5454
repo_url = "https://maven.revrobotics.com"
55-
version = "2025.0.3"
55+
version = "2027.0.0-alpha-1"
5656
staticlibs = [ "REVLibDriver"]
5757
extract_to = "lib"
5858

@@ -69,6 +69,42 @@ extract_to = "lib"
6969

7070
[tool.semiwrap]
7171
update_init = ["rev"]
72+
scan_headers_ignore = [
73+
# rev
74+
"rev/CANCommonParameters.h",
75+
"rev/CANDriverPrivate.h",
76+
"rev/CANServoHubDriver.h",
77+
"rev/CANServoHubFrames.h",
78+
"rev/CANServoHubParameters.h",
79+
"rev/CANSparkDriver.h",
80+
"rev/CANSparkDriverPrivate.h",
81+
"rev/CANSparkFrames.h",
82+
"rev/CANSparkMaxFrames.h",
83+
"rev/CANSparkParameters.h",
84+
"rev/CANSparkSWDL.h",
85+
"rev/REVCommon.h",
86+
"rev/REVLibDaemon.h",
87+
"rev/REVLibErrors.h",
88+
"rev/REVUtils.h",
89+
90+
"rev/ServoHubLowLevel.h",
91+
"rev/SparkFrameManager.h",
92+
93+
# rev/config
94+
"rev/config/ServoHubParameters.h",
95+
96+
# rev/rev
97+
"rev/rev/REVLibVersion.h",
98+
99+
# rev/sim
100+
"rev/sim/CANServoHub.h",
101+
"rev/sim/CANSpark.h",
102+
"rev/sim/MAXMotion.h",
103+
"rev/sim/SmartCurrentLimit.h",
104+
105+
# .
106+
"sparkbaseconfig_apply.h",
107+
]
72108

73109

74110
[tool.semiwrap.extension_modules."rev._rev"]
@@ -107,14 +143,15 @@ includes = [
107143
# rev
108144
AbsoluteEncoder = "rev/AbsoluteEncoder.h"
109145
AnalogInput = "rev/AnalogInput.h"
110-
# TODO: uncomment when GetFRCDeviceTypeText and GetFRCManufacturerText are
111-
# marked as `static inline`
112-
# CANDeviceScanner = "rev/CANDeviceScanner.h"
113146
CIEColor = "rev/CIEColor.h"
114147
ColorMatch = "rev/ColorMatch.h"
115148
ColorSensorV3 = "rev/ColorSensorV3.h"
116149
REVLibError = "rev/REVLibError.h"
117150
RelativeEncoder = "rev/RelativeEncoder.h"
151+
ServoChannel = "rev/ServoChannel.h"
152+
ServoHub = "rev/ServoHub.h"
153+
ServoHubLowLevel = "rev/ServoHubLowLevel.h"
154+
ServoHubSim = "rev/ServoHubSim.h"
118155
SparkAbsoluteEncoder = "rev/SparkAbsoluteEncoder.h"
119156
SparkAnalogSensor = "rev/SparkAnalogSensor.h"
120157
SparkBase = "rev/SparkBase.h"
@@ -147,6 +184,10 @@ LimitSwitchConfig = "rev/config/LimitSwitchConfig.h"
147184
LimitSwitchConfigAccessor = "rev/config/LimitSwitchConfigAccessor.h"
148185
MAXMotionConfig = "rev/config/MAXMotionConfig.h"
149186
MAXMotionConfigAccessor = "rev/config/MAXMotionConfigAccessor.h"
187+
ServoChannelConfig = "rev/config/ServoChannelConfig.h"
188+
ServoChannelConfigAccessor = "rev/config/ServoChannelConfigAccessor.h"
189+
ServoHubConfig = "rev/config/ServoHubConfig.h"
190+
ServoHubConfigAccessor = "rev/config/ServoHubConfigAccessor.h"
150191
SignalsConfig = "rev/config/SignalsConfig.h"
151192
SignalsConfigAccessor = "rev/config/SignalsConfigAccessor.h"
152193
SmartMotionConfig = "rev/config/SmartMotionConfig.h"
@@ -164,6 +205,7 @@ SparkParameters = "rev/config/SparkParameters.h"
164205
# rev/sim
165206
MovingAverageFilterSim = "rev/sim/MovingAverageFilterSim.h"
166207
NoiseGenerator = "rev/sim/NoiseGenerator.h"
208+
ServoHubSimFaultManager = "rev/sim/ServoHubSimFaultManager.h"
167209
SparkAbsoluteEncoderSim = "rev/sim/SparkAbsoluteEncoderSim.h"
168210
SparkAnalogSensorSim = "rev/sim/SparkAnalogSensorSim.h"
169211
SparkExternalEncoderSim = "rev/sim/SparkExternalEncoderSim.h"

rev/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
NoiseGenerator,
3232
REVLibError,
3333
RelativeEncoder,
34+
ServoChannel,
35+
ServoChannelConfig,
36+
ServoChannelConfigAccessor,
37+
ServoHub,
38+
ServoHubConfig,
39+
ServoHubConfigAccessor,
40+
ServoHubLowLevel,
41+
ServoHubSim,
42+
ServoHubSimFaultManager,
3443
SignalsConfig,
3544
SignalsConfigAccessor,
3645
SmartMotionConfig,
@@ -95,6 +104,15 @@
95104
"NoiseGenerator",
96105
"REVLibError",
97106
"RelativeEncoder",
107+
"ServoChannel",
108+
"ServoChannelConfig",
109+
"ServoChannelConfigAccessor",
110+
"ServoHub",
111+
"ServoHubConfig",
112+
"ServoHubConfigAccessor",
113+
"ServoHubLowLevel",
114+
"ServoHubSim",
115+
"ServoHubSimFaultManager",
98116
"SignalsConfig",
99117
"SignalsConfigAccessor",
100118
"SmartMotionConfig",

0 commit comments

Comments
 (0)