Skip to content

Commit

Permalink
Fix NavX simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Feb 27, 2020
1 parent 9663e6b commit e1e514e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Install build dependencies
run: |
python -m pip install 'robotpy-build>=2020.1.8'
python -m pip install 'robotpy-build>=2020.1.11'
python -m robotpy_build build-dep --install --find-links https://www.tortall.net/~robotpy/wheels/2020/linux_x86_64
- name: Build wheel
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
python-version: 3.8

- name: Install build dependencies
run: python -m pip install 'robotpy-build>=2020.1.8'
run: python -m pip install 'robotpy-build>=2020.1.11'

- name: Build sdist
run: python setup.py sdist
Expand Down
24 changes: 24 additions & 0 deletions navx/src/0001-Fix-C-simulation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 30541d27551a9d08f445a3c27adee705a3533eb2 Mon Sep 17 00:00:00 2001
From: Dustin Spicuzza <dustin@virtualroadside.com>
Date: Thu, 27 Feb 2020 02:00:32 -0500
Subject: [PATCH] Fix C++ simulation

---
roborio/c++/navx_frc_cpp/src/SimIO.cpp | 1 +
1 file changed, 1 insertion(+)

diff --git a/roborio/c++/navx_frc_cpp/src/SimIO.cpp b/roborio/c++/navx_frc_cpp/src/SimIO.cpp
index 7f7a235..53d5596 100644
--- a/roborio/c++/navx_frc_cpp/src/SimIO.cpp
+++ b/roborio/c++/navx_frc_cpp/src/SimIO.cpp
@@ -19,6 +19,7 @@ SimIO::SimIO( uint8_t update_rate_hz,
this->stop = false;
this->start_seconds = 0.0;
this->is_connected = false;
+ this->sim_device = sim_device;

raw_data_update = {};
ahrs_update = {};
--
2.24.1

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"robotpy-build>=2020.1.8,<2021.0.0",
"robotpy-build>=2020.1.11,<2021.0.0",
"wpilib>=2020.3.2.0,<2021.0.0",
]

Expand All @@ -26,6 +26,10 @@ sources = [
"SimIO.cpp"
]

[[tool.robotpy-build.wrappers."navx".maven_lib_download.patches]]
patch = "navx/src/0001-Fix-C-simulation.patch"
strip = 4

[tool.robotpy-build.wrappers."navx"]
name = "navx"
depends = ["wpilibc", "wpilib_core", "wpiHal"]
Expand Down

0 comments on commit e1e514e

Please sign in to comment.