From f943787db710c0b2b705462aec1f88b6afa693bc Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Sat, 19 Oct 2024 22:25:54 -0400 Subject: [PATCH] Update to 2025 beta --- .github/workflows/dist.yml | 2 +- docs/api.rst | 3 +-- examples/basic/robot.py | 6 +++--- navx/src/sources.patch | 2 +- pyproject.toml | 20 ++++++++++---------- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 3673d4f..beb210a 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -11,7 +11,7 @@ on: jobs: ci: - uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2024 + uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2025 with: artifactory_repo_type: vendor secrets: diff --git a/docs/api.rst b/docs/api.rst index 76890fa..68d6b53 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -2,8 +2,7 @@ NavX API ======== -This is not installed on the Robot by default. For installation instructions, -see :ref:`robotpy-navx install docs `. +This is not installed on the robot by default. NavX AHRS Interface ------------------- diff --git a/examples/basic/robot.py b/examples/basic/robot.py index 3f602eb..48a65cf 100755 --- a/examples/basic/robot.py +++ b/examples/basic/robot.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import wpilib -from networktables import NetworkTables +from ntcore import NetworkTableInstance import navx @@ -13,7 +13,7 @@ def run(): class MyRobot(wpilib.TimedRobot): def robotInit(self): - self.sd = NetworkTables.getTable("SmartDashboard") + self.sd = NetworkTableInstance.getDefault().getTable("SmartDashboard") self.timer = wpilib.Timer() @@ -36,7 +36,7 @@ def disabledInit(self): self.timer.start() def disabledPeriodic(self): - if self.timer.hasPeriodPassed(0.5): + if self.timer.advanceIfElapsed(0.5): self.sd.putNumber("Displacement X", self.navx.getDisplacementX()) self.sd.putNumber("Displacement Y", self.navx.getDisplacementY()) self.sd.putBoolean("IsCalibrating", self.navx.isCalibrating()) diff --git a/navx/src/sources.patch b/navx/src/sources.patch index e317de6..eb39170 100644 --- a/navx/src/sources.patch +++ b/navx/src/sources.patch @@ -53,7 +53,7 @@ diff -ur orig/SimIO.cpp patched/SimIO.cpp + HAL_NotifierHandle handle = m_notifier.exchange(0); + HAL_StopNotifier(handle, &status); + FRC_ReportError(status, "{}", "~SimIO stop"); -+ HAL_CleanNotifier(handle, &status); ++ HAL_CleanNotifier(handle); + FRC_ReportError(status, "{}", "~SimIO clean"); } diff --git a/pyproject.toml b/pyproject.toml index 626aa87..01f868d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [build-system] requires = [ - "robotpy-build<2025.0.0,~=2024.0.0", - "robotpy-wpimath<2025.0.0,>=2024.3.2", - "robotpy-wpiutil<2025.0.0,>=2024.3.2", - "wpilib<2025.0.0,>=2024.3.2", + "robotpy-build<2025.0.0b1,~=2025.0.0a1", + "robotpy-wpiutil~=2025.0.0b1", + "robotpy-wpimath~=2025.0.0b1", + "wpilib~=2025.0.0b1", ] [tool.robotpy-build] @@ -17,16 +17,16 @@ author_email = "robotpy@googlegroups.com" url = "https://github.com/robotpy/robotpy-navx" license = "BSD-3-Clause" install_requires = [ - "robotpy-wpimath<2025.0.0,>=2024.3.2", - "robotpy-wpiutil<2025.0.0,>=2024.3.2", - "wpilib<2025.0.0,>=2024.3.2", + "robotpy-wpiutil~=2025.0.0b1", + "robotpy-wpimath~=2025.0.0b1", + "wpilib~=2025.0.0b1", ] [tool.robotpy-build.wrappers."navx".maven_lib_download] -artifact_id = "navx-frc-cpp" +artifact_id = "navx_frc-cpp" group_id = "com.kauailabs.navx.frc" -repo_url = "https://dev.studica.com/maven/release/2024" -version = "2024.1.0" +repo_url = "https://dev.studica.com/maven/release/2025" +version = "2025.1.1-beta-1" use_sources = true sources = [ "AHRS.cpp",