From eb6d22b2d538f81b235f46648e0ea612b7050fce Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Sun, 20 Oct 2024 00:03:11 -0400 Subject: [PATCH 1/4] Updates for 2025 --- .github/workflows/dist.yml | 4 +-- phoenix5/__init__.py | 33 ++-------------------- phoenix5/_osx_phoenix6_pkgcfg.py | 2 -- pyproject.toml | 48 ++++++++++++++++---------------- 4 files changed, 29 insertions(+), 58 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index e4a4c43..0be2207 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -11,14 +11,14 @@ on: jobs: ci: - uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2024 + uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2025 with: enable_raspbian: false enable_sphinx_check: false artifactory_repo_type: vendor fail_fast: false python_versions: >- - ["3.9", "3.10", "3.11", "3.12"] + ["3.12", "3.13"] secrets: META_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} RTD_TOKEN: ${{ secrets.RTD_TOKEN }} diff --git a/phoenix5/__init__.py b/phoenix5/__init__.py index 90ad3e0..8efb074 100644 --- a/phoenix5/__init__.py +++ b/phoenix5/__init__.py @@ -1,7 +1,9 @@ from . import _init_phoenix6 from . import _init_ctre -# autogenerated by 'robotpy-build create-imports ctre' +from .version import version as __version__ + +# autogenerated by 'robotpy-build create-imports phoenix5 phoenix5._ctre' from ._ctre import ( BaseMotorController, BaseMotorControllerConfiguration, @@ -47,10 +49,8 @@ LimitSwitchRoutines, LimitSwitchSource, MotionProfileStatus, - MotorCommutation, MovingAverage, NeutralMode, - Orchestra, ParamEnum, RemoteFeedbackDevice, RemoteLimitSwitchSource, @@ -60,21 +60,11 @@ SetValueMotionProfile, SlotConfigUtil, SlotConfiguration, - StatorCurrentLimitConfiguration, StatusFrame, StatusFrameEnhanced, StatusFrameRoutines, StickyFaults, SupplyCurrentLimitConfiguration, - TalonFX, - TalonFXConfigUtil, - TalonFXConfiguration, - TalonFXControlMode, - TalonFXFeedbackDevice, - TalonFXInvertType, - TalonFXPIDSetConfiguration, - TalonFXSensorCollection, - TalonFXSimCollection, TalonSRX, TalonSRXConfigUtil, TalonSRXConfiguration, @@ -93,7 +83,6 @@ VictorSPXPIDSetConfiguration, VictorSPXSimCollection, WPI_BaseMotorController, - WPI_TalonFX, WPI_TalonSRX, WPI_VictorSPX, ) @@ -143,10 +132,8 @@ "LimitSwitchRoutines", "LimitSwitchSource", "MotionProfileStatus", - "MotorCommutation", "MovingAverage", "NeutralMode", - "Orchestra", "ParamEnum", "RemoteFeedbackDevice", "RemoteLimitSwitchSource", @@ -156,21 +143,11 @@ "SetValueMotionProfile", "SlotConfigUtil", "SlotConfiguration", - "StatorCurrentLimitConfiguration", "StatusFrame", "StatusFrameEnhanced", "StatusFrameRoutines", "StickyFaults", "SupplyCurrentLimitConfiguration", - "TalonFX", - "TalonFXConfigUtil", - "TalonFXConfiguration", - "TalonFXControlMode", - "TalonFXFeedbackDevice", - "TalonFXInvertType", - "TalonFXPIDSetConfiguration", - "TalonFXSensorCollection", - "TalonFXSimCollection", "TalonSRX", "TalonSRXConfigUtil", "TalonSRXConfiguration", @@ -189,10 +166,6 @@ "VictorSPXPIDSetConfiguration", "VictorSPXSimCollection", "WPI_BaseMotorController", - "WPI_TalonFX", "WPI_TalonSRX", "WPI_VictorSPX", ] - - -from .version import version as __version__ diff --git a/phoenix5/_osx_phoenix6_pkgcfg.py b/phoenix5/_osx_phoenix6_pkgcfg.py index e52ee1d..c34b497 100644 --- a/phoenix5/_osx_phoenix6_pkgcfg.py +++ b/phoenix5/_osx_phoenix6_pkgcfg.py @@ -32,7 +32,6 @@ def get_library_names(): "CTRE_SimProCANcoder", "CTRE_SimProPigeon2", "CTRE_SimProTalonFX", - "CTRE_SimTalonFX", "CTRE_SimTalonSRX", "CTRE_SimVictorSPX", ] @@ -46,7 +45,6 @@ def get_library_full_names(): "libCTRE_SimProCANcoder.dylib", "libCTRE_SimProPigeon2.dylib", "libCTRE_SimProTalonFX.dylib", - "libCTRE_SimTalonFX.dylib", "libCTRE_SimTalonSRX.dylib", "libCTRE_SimVictorSPX.dylib", ] diff --git a/pyproject.toml b/pyproject.toml index ef2f89a..eab0ac1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,15 +6,15 @@ author_email = "robotpy@googlegroups.com" url = "https://github.com/robotpy/robotpy-ctre" license = "MIT" install_requires = [ - "wpilib<2025.0.0,>=2024.3.2", - "phoenix6~=24.2", + "wpilib~=2025.0.0b1", + "phoenix6~=25.0.0b1", ] [build-system] requires = [ - "robotpy-build<2025.0.0,>=2024.0.0", - "wpilib<2025.0.0,>=2024.3.2", - "phoenix6~=24.2", + "robotpy-build<2025.0.0b1,~=2025.0.0a1", + "wpilib~=2025.0.0b1", + "phoenix6~=25.0.0b1", ] [tool.robotpy-build] @@ -46,7 +46,7 @@ depends = [ artifact_id = "wpiapi-cpp" group_id = "com.ctre.phoenix" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.33.1" +version = "5.34.0-beta-1" libs = [ "CTRE_Phoenix_WPI", ] @@ -66,7 +66,7 @@ depends = [ artifact_id = "api-cpp" group_id = "com.ctre.phoenix" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.33.1" +version = "5.34.0-beta-1" libs = [ "CTRE_Phoenix", ] @@ -85,7 +85,7 @@ depends = [ artifact_id = "cci" group_id = "com.ctre.phoenix" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.33.1" +version = "5.34.0-beta-1" libs = [ "CTRE_PhoenixCCI", ] @@ -101,7 +101,7 @@ ignore = false artifact_id = "tools" group_id = "com.ctre.phoenix6" repo_url = "https://maven.ctr-electronics.com/release" -version = "24.2.0" +version = "25.0.0-beta-1" libs = [] [tool.robotpy-build.wrappers."phoenix5._wpiapi_cpp_sim"] @@ -121,7 +121,7 @@ ignore = true artifact_id = "wpiapi-cpp-sim" group_id = "com.ctre.phoenix.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.33.1" +version = "5.34.0-beta-1" libs = [ "CTRE_Phoenix_WPISim", ] @@ -140,7 +140,7 @@ ignore = true artifact_id = "api-cpp-sim" group_id = "com.ctre.phoenix.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.33.1" +version = "5.34.0-beta-1" libs = [ "CTRE_PhoenixSim", ] @@ -164,7 +164,7 @@ ignore = true artifact_id = "cci-sim" group_id = "com.ctre.phoenix.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.33.1" +version = "5.34.0-beta-1" libs = [ "CTRE_PhoenixCCISim", ] @@ -181,7 +181,7 @@ ignore = true artifact_id = "tools-sim" group_id = "com.ctre.phoenix6.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "24.2.0" +version = "25.0.0-beta-1" libs = [] # libs = [ # "CTRE_PhoenixTools_Sim", @@ -235,13 +235,13 @@ depends = [ # ctre/phoenix/motorcontrol/can WPI_BaseMotorController = "ctre/phoenix/motorcontrol/can/WPI_BaseMotorController.h" -WPI_TalonFX = "ctre/phoenix/motorcontrol/can/WPI_TalonFX.h" +# WPI_TalonFX = "ctre/phoenix/motorcontrol/can/WPI_TalonFX.h" WPI_TalonSRX = "ctre/phoenix/motorcontrol/can/WPI_TalonSRX.h" WPI_VictorSPX = "ctre/phoenix/motorcontrol/can/WPI_VictorSPX.h" # ctre/phoenix/sensors WPI_CANCoder = "ctre/phoenix/sensors/WPI_CANCoder.h" -WPI_Pigeon2 = "ctre/phoenix/sensors/WPI_Pigeon2.h" +# WPI_Pigeon2 = "ctre/phoenix/sensors/WPI_Pigeon2.h" WPI_PigeonIMU = "ctre/phoenix/sensors/WPI_PigeonIMU.h" # ctre/phoenix/tasking @@ -291,20 +291,20 @@ IFollower = "ctre/phoenix/motorcontrol/IFollower.h" IMotorController = "ctre/phoenix/motorcontrol/IMotorController.h" IMotorControllerEnhanced = "ctre/phoenix/motorcontrol/IMotorControllerEnhanced.h" SensorCollection = "ctre/phoenix/motorcontrol/SensorCollection.h" -TalonFXSensorCollection = "ctre/phoenix/motorcontrol/TalonFXSensorCollection.h" -TalonFXSimCollection = "ctre/phoenix/motorcontrol/TalonFXSimCollection.h" +# TalonFXSensorCollection = "ctre/phoenix/motorcontrol/TalonFXSensorCollection.h" +# TalonFXSimCollection = "ctre/phoenix/motorcontrol/TalonFXSimCollection.h" TalonSRXSimCollection = "ctre/phoenix/motorcontrol/TalonSRXSimCollection.h" VictorSPXSimCollection = "ctre/phoenix/motorcontrol/VictorSPXSimCollection.h" # ctre/phoenix/motorcontrol/can BaseMotorController = "ctre/phoenix/motorcontrol/can/BaseMotorController.h" BaseTalon = "ctre/phoenix/motorcontrol/can/BaseTalon.h" -TalonFX = "ctre/phoenix/motorcontrol/can/TalonFX.h" +# TalonFX = "ctre/phoenix/motorcontrol/can/TalonFX.h" TalonSRX = "ctre/phoenix/motorcontrol/can/TalonSRX.h" VictorSPX = "ctre/phoenix/motorcontrol/can/VictorSPX.h" # ctre/phoenix/music -Orchestra = "ctre/phoenix/music/Orchestra.h" +# Orchestra = "ctre/phoenix/music/Orchestra.h" # ctre/phoenix/platform/can # PlatformCAN = "ctre/phoenix/platform/can/PlatformCAN.h" @@ -314,7 +314,7 @@ BasePigeon = "ctre/phoenix/sensors/BasePigeon.h" BasePigeonSimCollection = "ctre/phoenix/sensors/BasePigeonSimCollection.h" CANCoder = "ctre/phoenix/sensors/CANCoder.h" CANCoderSimCollection = "ctre/phoenix/sensors/CANCoderSimCollection.h" -Pigeon2 = "ctre/phoenix/sensors/Pigeon2.h" +# Pigeon2 = "ctre/phoenix/sensors/Pigeon2.h" PigeonIMU = "ctre/phoenix/sensors/PigeonIMU.h" # ctre/phoenix/signals @@ -417,11 +417,11 @@ FeedbackDevice = "ctre/phoenix/motorcontrol/FeedbackDevice.h" FollowerType = "ctre/phoenix/motorcontrol/FollowerType.h" InvertType = "ctre/phoenix/motorcontrol/InvertType.h" LimitSwitchType = "ctre/phoenix/motorcontrol/LimitSwitchType.h" -MotorCommutation = "ctre/phoenix/motorcontrol/MotorCommutation.h" +# MotorCommutation = "ctre/phoenix/motorcontrol/MotorCommutation.h" NeutralMode = "ctre/phoenix/motorcontrol/NeutralMode.h" RemoteSensorSource = "ctre/phoenix/motorcontrol/RemoteSensorSource.h" SensorTerm = "ctre/phoenix/motorcontrol/SensorTerm.h" -StatorCurrentLimitConfiguration = "ctre/phoenix/motorcontrol/StatorCurrentLimitConfiguration.h" +# StatorCurrentLimitConfiguration = "ctre/phoenix/motorcontrol/StatorCurrentLimitConfiguration.h" StatusFrame = "ctre/phoenix/motorcontrol/StatusFrame.h" StickyFaults = "ctre/phoenix/motorcontrol/StickyFaults.h" SupplyCurrentLimitConfiguration = "ctre/phoenix/motorcontrol/SupplyCurrentLimitConfiguration.h" @@ -445,8 +445,8 @@ CANCoderFaults = "ctre/phoenix/sensors/CANCoderFaults.h" CANCoderStatusFrame = "ctre/phoenix/sensors/CANCoderStatusFrame.h" CANCoderStickyFaults = "ctre/phoenix/sensors/CANCoderStickyFaults.h" MagnetFieldStrength = "ctre/phoenix/sensors/MagnetFieldStrength.h" -Pigeon2_Faults = "ctre/phoenix/sensors/Pigeon2_Faults.h" -Pigeon2_StickyFaults = "ctre/phoenix/sensors/Pigeon2_StickyFaults.h" +# Pigeon2_Faults = "ctre/phoenix/sensors/Pigeon2_Faults.h" +# Pigeon2_StickyFaults = "ctre/phoenix/sensors/Pigeon2_StickyFaults.h" PigeonIMU_ControlFrame = "ctre/phoenix/sensors/PigeonIMU_ControlFrame.h" PigeonIMU_Faults = "ctre/phoenix/sensors/PigeonIMU_Faults.h" PigeonIMU_StatusFrame = "ctre/phoenix/sensors/PigeonIMU_StatusFrame.h" From a9442e1197422b1f57e178b29838956bc099459a Mon Sep 17 00:00:00 2001 From: David Vo Date: Sat, 2 Nov 2024 22:39:15 +1100 Subject: [PATCH 2/4] Update to Phoenix beta 2 --- pyproject.toml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eab0ac1..4134eff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,14 +7,14 @@ url = "https://github.com/robotpy/robotpy-ctre" license = "MIT" install_requires = [ "wpilib~=2025.0.0b1", - "phoenix6~=25.0.0b1", + "phoenix6~=25.0.0b2", ] [build-system] requires = [ "robotpy-build<2025.0.0b1,~=2025.0.0a1", "wpilib~=2025.0.0b1", - "phoenix6~=25.0.0b1", + "phoenix6~=25.0.0b2", ] [tool.robotpy-build] @@ -46,7 +46,7 @@ depends = [ artifact_id = "wpiapi-cpp" group_id = "com.ctre.phoenix" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.34.0-beta-1" +version = "5.34.0-beta-2" libs = [ "CTRE_Phoenix_WPI", ] @@ -66,7 +66,7 @@ depends = [ artifact_id = "api-cpp" group_id = "com.ctre.phoenix" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.34.0-beta-1" +version = "5.34.0-beta-2" libs = [ "CTRE_Phoenix", ] @@ -85,7 +85,7 @@ depends = [ artifact_id = "cci" group_id = "com.ctre.phoenix" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.34.0-beta-1" +version = "5.34.0-beta-2" libs = [ "CTRE_PhoenixCCI", ] @@ -101,7 +101,7 @@ ignore = false artifact_id = "tools" group_id = "com.ctre.phoenix6" repo_url = "https://maven.ctr-electronics.com/release" -version = "25.0.0-beta-1" +version = "25.0.0-beta-2" libs = [] [tool.robotpy-build.wrappers."phoenix5._wpiapi_cpp_sim"] @@ -121,7 +121,7 @@ ignore = true artifact_id = "wpiapi-cpp-sim" group_id = "com.ctre.phoenix.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.34.0-beta-1" +version = "5.34.0-beta-2" libs = [ "CTRE_Phoenix_WPISim", ] @@ -140,7 +140,7 @@ ignore = true artifact_id = "api-cpp-sim" group_id = "com.ctre.phoenix.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.34.0-beta-1" +version = "5.34.0-beta-2" libs = [ "CTRE_PhoenixSim", ] @@ -164,7 +164,7 @@ ignore = true artifact_id = "cci-sim" group_id = "com.ctre.phoenix.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "5.34.0-beta-1" +version = "5.34.0-beta-2" libs = [ "CTRE_PhoenixCCISim", ] @@ -181,7 +181,7 @@ ignore = true artifact_id = "tools-sim" group_id = "com.ctre.phoenix6.sim" repo_url = "https://maven.ctr-electronics.com/release" -version = "25.0.0-beta-1" +version = "25.0.0-beta-2" libs = [] # libs = [ # "CTRE_PhoenixTools_Sim", From 2b70f6c5f1734bcbd00a2244c7cc679472f28e34 Mon Sep 17 00:00:00 2001 From: David Vo Date: Sat, 2 Nov 2024 22:56:25 +1100 Subject: [PATCH 3/4] Fix phoenix5.sensors imports --- phoenix5/sensors.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/phoenix5/sensors.py b/phoenix5/sensors.py index fa2bcde..3f593de 100644 --- a/phoenix5/sensors.py +++ b/phoenix5/sensors.py @@ -1,7 +1,6 @@ # autogenerated by 'robotpy-build create-imports ctre ctre._ctre.sensors' from ._ctre.sensors import ( AbsoluteSensorRange, - AxisDirection, BasePigeon, BasePigeonConfigUtils, BasePigeonConfiguration, @@ -14,11 +13,6 @@ CANCoderStatusFrame, CANCoderStickyFaults, MagnetFieldStrength, - Pigeon2, - Pigeon2ConfigUtils, - Pigeon2Configuration, - Pigeon2_Faults, - Pigeon2_StickyFaults, PigeonIMU, PigeonIMUConfigUtils, PigeonIMUConfiguration, @@ -30,13 +24,11 @@ SensorTimeBase, SensorVelocityMeasPeriod, WPI_CANCoder, - WPI_Pigeon2, WPI_PigeonIMU, ) __all__ = [ "AbsoluteSensorRange", - "AxisDirection", "BasePigeon", "BasePigeonConfigUtils", "BasePigeonConfiguration", @@ -49,11 +41,6 @@ "CANCoderStatusFrame", "CANCoderStickyFaults", "MagnetFieldStrength", - "Pigeon2", - "Pigeon2ConfigUtils", - "Pigeon2Configuration", - "Pigeon2_Faults", - "Pigeon2_StickyFaults", "PigeonIMU", "PigeonIMUConfigUtils", "PigeonIMUConfiguration", @@ -65,6 +52,5 @@ "SensorTimeBase", "SensorVelocityMeasPeriod", "WPI_CANCoder", - "WPI_Pigeon2", "WPI_PigeonIMU", ] From 697c47153790340f620d7d7cc0ae4c8e3ea1aa42 Mon Sep 17 00:00:00 2001 From: David Vo Date: Sat, 2 Nov 2024 23:02:22 +1100 Subject: [PATCH 4/4] Remove TalonFX from tests --- tests/test_ctre.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/test_ctre.py b/tests/test_ctre.py index 8f058f5..8b3513d 100644 --- a/tests/test_ctre.py +++ b/tests/test_ctre.py @@ -9,14 +9,6 @@ def test_wpi_talonsrx(): del m -def test_wpi_talonfx(): - m = phoenix5.WPI_TalonFX(1) - m.setNeutralMode(phoenix5.NeutralMode.Brake) - m.set(0.5) - assert m.get() == 0.5 - del m - - def test_wpi_victorspx(): m = phoenix5.WPI_VictorSPX(2) m.setNeutralMode(phoenix5.NeutralMode.Brake) @@ -26,8 +18,8 @@ def test_wpi_victorspx(): def test_follow(): - m1 = phoenix5.WPI_TalonFX(3) - m2 = phoenix5.WPI_TalonFX(4) + m1 = phoenix5.WPI_TalonSRX(3) + m2 = phoenix5.WPI_VictorSPX(4) m2.follow(m1) m1.set(0.5) assert m1.get() == 0.5