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
24 changes: 12 additions & 12 deletions gen/AHRS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,20 @@
extra_includes:
- wpi/sendable/SendableHelper.h

inline_code: |
#include <src/rpy/AHRS.cpp.inl>

classes:
AHRS:
shared_ptr: true
ignored_bases:
- wpi::SendableHelper<AHRS>
- wpi::SendableHelper<studica::AHRS>
enums:
BoardAxis:
NavXComType:
NavXUpdateRate:
SerialDataType:
methods:
AHRS:
overloads:
frc::SPI::Port:
frc::I2C::Port:
frc::SerialPort::Port:
frc::SPI::Port, uint8_t:
frc::SPI::Port, uint32_t, uint8_t:
frc::I2C::Port, uint8_t:
frc::SerialPort::Port, AHRS::SerialDataType, uint8_t:
NavXComType:
NavXComType, NavXUpdateRate:
GetPitch:
doc: |
Returns the current pitch value (in degrees, from -180 to 180)
Expand Down Expand Up @@ -633,3 +626,10 @@ classes:
attributes:
board_axis:
up:

inline_code: |
cls_AHRS.def_static("create_spi", []() {
return std::make_shared<studica::AHRS>(studica::AHRS::NavXComType::kMXP_SPI);
}, release_gil(),
"Constructs the AHRS class using SPI communication and default settings.\n"
"Use the constructor if you need more customization.");
38 changes: 0 additions & 38 deletions navx/src/rpy/AHRS.cpp.inl

This file was deleted.

58 changes: 25 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[build-system]
requires = [
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2025.0.0b1",
"robotpy-wpimath~=2025.0.0b1",
"wpilib~=2025.0.0b1",
"robotpy-wpiutil~=2025.0.0b2",
"robotpy-wpimath~=2025.0.0b2",
"wpilib~=2025.0.0b2",
]

[tool.robotpy-build]
Expand All @@ -17,56 +17,48 @@ author_email = "robotpy@googlegroups.com"
url = "https://github.com/robotpy/robotpy-navx"
license = "BSD-3-Clause"
install_requires = [
"robotpy-wpiutil~=2025.0.0b1",
"robotpy-wpimath~=2025.0.0b1",
"wpilib~=2025.0.0b1",
"robotpy-wpiutil~=2025.0.0b2",
"robotpy-wpimath~=2025.0.0b2",
"wpilib~=2025.0.0b2",
]

[tool.robotpy-build.wrappers."navx".maven_lib_download]
artifact_id = "navx_frc-cpp"
group_id = "com.kauailabs.navx.frc"
[tool.robotpy-build.static_libs."studica_driver".maven_lib_download]
artifact_id = "Studica-driver"
group_id = "com.studica.frc"
repo_url = "https://dev.studica.com/maven/release/2025"
version = "2025.1.1-beta-1"
use_sources = true
sources = [
"AHRS.cpp",
"ContinuousAngleTracker.cpp",
"InertialDataIntegrator.cpp",
"OffsetTracker.cpp",
"RegisterIO.cpp",
"RegisterIOI2C.cpp",
"RegisterIOMau.cpp",
"RegisterIOSPI.cpp",
"SerialIO.cpp",
"SimIO.cpp",
"Tracer.cpp"
]
version = "2025.1.1-beta-3"
libs = ["StudicaDriver"]

[[tool.robotpy-build.wrappers."navx".maven_lib_download.patches]]
patch = "navx/src/sources.patch"
strip = 1

[[tool.robotpy-build.wrappers."navx".maven_lib_download.header_patches]]
patch = "navx/src/ahrs.h.patch"
strip = 2
[tool.robotpy-build.static_libs."studica_lib".maven_lib_download]
artifact_id = "Studica-cpp"
group_id = "com.studica.frc"
repo_url = "https://dev.studica.com/maven/release/2025"
version = "2025.1.1-beta-3"
libs = ["Studica"]

[tool.robotpy-build.wrappers."navx"]
name = "navx"
depends = [
"wpilib_core",
"wpimath_cpp",
"wpimath_geometry",
"wpiHal",
"wpilibc",
"wpilib_core",
"wpimath_cpp",
"wpimath_geometry",
"wpiHal",
"ntcore",
"wpiutil",
"studica_driver",
"studica_lib",
]

sources = [
"navx/src/rpy/navx.cpp"
]

generate = [
{ AHRS = "AHRS.h" },
# { ITimestampedDataSubscriber = "ITimestampedDataSubscriber.h" },
{ AHRS = "studica/AHRS.h" },
]
generation_data = "gen"
Loading