Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// THIS IS AUTO-GENERATED BY /home/runner/work/allwpilib/allwpilib/tools/wpical/src/main/native/thirdparty/mrcal/src/minimath/minimath_generate.pl. DO NOT EDIT BY HAND
// THIS IS AUTO-GENERATED BY minimath/minimath_generate.pl. DO NOT EDIT BY HAND

// This contains dot products, norms, basic vector arithmetic and multiplication

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use List::Util qw(min);
use List::MoreUtils qw(pairwise);

say "// THIS IS AUTO-GENERATED BY $0. DO NOT EDIT BY HAND\n";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So… $0 should be the literal argv[0]. We could run this script by relative path rather than by the absolute path we currently use, which should avoid the problem without requiring a patch?

say "// THIS IS AUTO-GENERATED BY minimath/minimath_generate.pl. DO NOT EDIT BY HAND\n";
say "// This contains dot products, norms, basic vector arithmetic and multiplication\n";

my @sizes = 2..6;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Mon, 11 Nov 2024 00:15:05 -0500
Subject: [PATCH 1/7] Fix MSVC build errors
Subject: [PATCH 1/8] Fix MSVC build errors

---
_autodiff.hh | 4 ++--
Expand Down
2 changes: 1 addition & 1 deletion upstream_utils/mrcal_patches/0002-Make-mrcal-C.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Fri, 22 Nov 2024 09:55:22 -0500
Subject: [PATCH 2/7] Make mrcal C++
Subject: [PATCH 2/8] Make mrcal C++

---
mrcal.c => mrcal.cpp | 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Fri, 29 Nov 2024 22:56:02 -0500
Subject: [PATCH 3/7] Replace VLAs with vectors
Subject: [PATCH 3/8] Replace VLAs with vectors

---
mrcal.cpp | 101 +++++++++++++++++++++++++++---------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Wed, 4 Dec 2024 00:58:00 -0500
Subject: [PATCH 4/7] Fix MSVC build errors
Subject: [PATCH 4/8] Fix MSVC build errors

---
minimath/minimath-extra.h | 1 +
Expand Down
2 changes: 1 addition & 1 deletion upstream_utils/mrcal_patches/0005-Fix-UB-in-mrcal.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matt <matthew.morley.ca@gmail.com>
Date: Thu, 5 Dec 2024 00:10:15 -0500
Subject: [PATCH 5/7] Fix UB in mrcal
Subject: [PATCH 5/8] Fix UB in mrcal

---
mrcal.cpp | 27 ++++++++++++++++-----------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Thu, 16 Jul 2026 21:49:36 -0700
Subject: [PATCH 6/7] Suppress unused-but-set warning
Subject: [PATCH 6/8] Suppress unused-but-set warning

---
mrcal.cpp | 2 +-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thad House <thadhouse1@gmail.com>
Date: Sat, 29 Aug 2026 15:43:14 -0700
Subject: [PATCH 7/7] Fix Clang 21 warning
Subject: [PATCH 7/8] Fix Clang 21 warning

---
poseutils.c | 2 +-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Thu, 3 Sep 2026 21:21:09 -0400
Subject: [PATCH 8/8] Remove absolute path in generated minimath file

---
minimath/minimath_generate.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/minimath/minimath_generate.pl b/minimath/minimath_generate.pl
index 044098b9f2337dba2a39ffa34da8718cae6837ea..29c1bfe803554a357e051c73bbbefffac9d1a215 100755
--- a/minimath/minimath_generate.pl
+++ b/minimath/minimath_generate.pl
@@ -5,7 +5,7 @@ use feature qw(say);
use List::Util qw(min);
use List::MoreUtils qw(pairwise);

-say "// THIS IS AUTO-GENERATED BY $0. DO NOT EDIT BY HAND\n";
+say "// THIS IS AUTO-GENERATED BY minimath/minimath_generate.pl. DO NOT EDIT BY HAND\n";
say "// This contains dot products, norms, basic vector arithmetic and multiplication\n";

my @sizes = 2..6;
Loading