Skip to content

Commit f426b06

Browse files
authored
Merge pull request #33 from robotpy/2025-beta-3
Update to studica beta 3
2 parents 1808f5d + 55bb9f7 commit f426b06

File tree

3 files changed

+37
-83
lines changed

3 files changed

+37
-83
lines changed

gen/AHRS.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@
33
extra_includes:
44
- wpi/sendable/SendableHelper.h
55

6-
inline_code: |
7-
#include <src/rpy/AHRS.cpp.inl>
8-
96
classes:
107
AHRS:
11-
shared_ptr: true
128
ignored_bases:
13-
- wpi::SendableHelper<AHRS>
9+
- wpi::SendableHelper<studica::AHRS>
1410
enums:
1511
BoardAxis:
12+
NavXComType:
13+
NavXUpdateRate:
1614
SerialDataType:
1715
methods:
1816
AHRS:
1917
overloads:
20-
frc::SPI::Port:
21-
frc::I2C::Port:
22-
frc::SerialPort::Port:
23-
frc::SPI::Port, uint8_t:
24-
frc::SPI::Port, uint32_t, uint8_t:
25-
frc::I2C::Port, uint8_t:
26-
frc::SerialPort::Port, AHRS::SerialDataType, uint8_t:
18+
NavXComType:
19+
NavXComType, NavXUpdateRate:
2720
GetPitch:
2821
doc: |
2922
Returns the current pitch value (in degrees, from -180 to 180)
@@ -633,3 +626,10 @@ classes:
633626
attributes:
634627
board_axis:
635628
up:
629+
630+
inline_code: |
631+
cls_AHRS.def_static("create_spi", []() {
632+
return std::make_shared<studica::AHRS>(studica::AHRS::NavXComType::kMXP_SPI);
633+
}, release_gil(),
634+
"Constructs the AHRS class using SPI communication and default settings.\n"
635+
"Use the constructor if you need more customization.");

navx/src/rpy/AHRS.cpp.inl

-38
This file was deleted.

pyproject.toml

+25-33
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[build-system]
22
requires = [
33
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
4-
"robotpy-wpiutil~=2025.0.0b1",
5-
"robotpy-wpimath~=2025.0.0b1",
6-
"wpilib~=2025.0.0b1",
4+
"robotpy-wpiutil~=2025.0.0b2",
5+
"robotpy-wpimath~=2025.0.0b2",
6+
"wpilib~=2025.0.0b2",
77
]
88

99
[tool.robotpy-build]
@@ -17,56 +17,48 @@ author_email = "[email protected]"
1717
url = "https://github.com/robotpy/robotpy-navx"
1818
license = "BSD-3-Clause"
1919
install_requires = [
20-
"robotpy-wpiutil~=2025.0.0b1",
21-
"robotpy-wpimath~=2025.0.0b1",
22-
"wpilib~=2025.0.0b1",
20+
"robotpy-wpiutil~=2025.0.0b2",
21+
"robotpy-wpimath~=2025.0.0b2",
22+
"wpilib~=2025.0.0b2",
2323
]
2424

25-
[tool.robotpy-build.wrappers."navx".maven_lib_download]
26-
artifact_id = "navx_frc-cpp"
27-
group_id = "com.kauailabs.navx.frc"
25+
[tool.robotpy-build.static_libs."studica_driver".maven_lib_download]
26+
artifact_id = "Studica-driver"
27+
group_id = "com.studica.frc"
2828
repo_url = "https://dev.studica.com/maven/release/2025"
29-
version = "2025.1.1-beta-1"
30-
use_sources = true
31-
sources = [
32-
"AHRS.cpp",
33-
"ContinuousAngleTracker.cpp",
34-
"InertialDataIntegrator.cpp",
35-
"OffsetTracker.cpp",
36-
"RegisterIO.cpp",
37-
"RegisterIOI2C.cpp",
38-
"RegisterIOMau.cpp",
39-
"RegisterIOSPI.cpp",
40-
"SerialIO.cpp",
41-
"SimIO.cpp",
42-
"Tracer.cpp"
43-
]
29+
version = "2025.1.1-beta-3"
30+
libs = ["StudicaDriver"]
4431

45-
[[tool.robotpy-build.wrappers."navx".maven_lib_download.patches]]
46-
patch = "navx/src/sources.patch"
47-
strip = 1
48-
49-
[[tool.robotpy-build.wrappers."navx".maven_lib_download.header_patches]]
50-
patch = "navx/src/ahrs.h.patch"
51-
strip = 2
32+
[tool.robotpy-build.static_libs."studica_lib".maven_lib_download]
33+
artifact_id = "Studica-cpp"
34+
group_id = "com.studica.frc"
35+
repo_url = "https://dev.studica.com/maven/release/2025"
36+
version = "2025.1.1-beta-3"
37+
libs = ["Studica"]
5238

5339
[tool.robotpy-build.wrappers."navx"]
5440
name = "navx"
5541
depends = [
42+
"wpilib_core",
43+
"wpimath_cpp",
44+
"wpimath_geometry",
45+
"wpiHal",
5646
"wpilibc",
5747
"wpilib_core",
5848
"wpimath_cpp",
5949
"wpimath_geometry",
6050
"wpiHal",
51+
"ntcore",
6152
"wpiutil",
53+
"studica_driver",
54+
"studica_lib",
6255
]
6356

6457
sources = [
6558
"navx/src/rpy/navx.cpp"
6659
]
6760

6861
generate = [
69-
{ AHRS = "AHRS.h" },
70-
# { ITimestampedDataSubscriber = "ITimestampedDataSubscriber.h" },
62+
{ AHRS = "studica/AHRS.h" },
7163
]
7264
generation_data = "gen"

0 commit comments

Comments
 (0)