Skip to content

Commit 3c5a37c

Browse files
committed
Merge branch 'jetson-orin' of https://github.com/FRC-Team-4143/photonvision into jetson-orin
2 parents daaa05f + 0a599f2 commit 3c5a37c

File tree

3 files changed

+150
-0
lines changed

3 files changed

+150
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) PhotonVision
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
package org.photonvision;
26+
27+
/*
28+
* Autogenerated file! Do not manually edit this file. This version is regenerated
29+
* any time the publish task is run, or when this file is deleted.
30+
*/
31+
32+
import java.util.regex.Matcher;
33+
import java.util.regex.Pattern;
34+
35+
@SuppressWarnings("ALL")
36+
public final class PhotonVersion {
37+
public static final String versionString = "dev-Unknown";
38+
public static final String buildDate = "2025-1-20 10:28:05";
39+
public static final boolean isRelease = !versionString.startsWith("dev");
40+
41+
public static final boolean versionMatches(String other) {
42+
String c = versionString;
43+
Pattern p = Pattern.compile("v[0-9]+.[0-9]+.[0-9]+");
44+
Matcher m = p.matcher(c);
45+
if (m.find()) {
46+
c = m.group(0);
47+
} else {
48+
return false;
49+
}
50+
m = p.matcher(other);
51+
if (m.find()) {
52+
other = m.group(0);
53+
} else {
54+
return false;
55+
}
56+
return c.equals(other);
57+
}
58+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (C) Photon Vision.
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <string.h>
19+
#include <regex>
20+
21+
/*
22+
* Autogenerated file! Do not manually edit this file. This version is
23+
* regenerated any time the publish task is run, or when this file is deleted.
24+
*/
25+
26+
static const char* dev_ = "dev";
27+
28+
namespace photon {
29+
namespace PhotonVersion {
30+
const char* versionString = "dev-Unknown";
31+
const char* buildDate = "2025-1-20 10:28:10";
32+
const bool isRelease = strncmp(dev_, versionString, strlen(dev_)) != 0;
33+
}
34+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) PhotonVision
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
package org.photonvision;
26+
27+
/*
28+
* Autogenerated file! Do not manually edit this file. This version is regenerated
29+
* any time the publish task is run, or when this file is deleted.
30+
*/
31+
32+
import java.util.regex.Matcher;
33+
import java.util.regex.Pattern;
34+
35+
@SuppressWarnings("ALL")
36+
public final class PhotonVersion {
37+
public static final String versionString = "dev-Unknown";
38+
public static final String buildDate = "2025-1-20 10:28:10";
39+
public static final boolean isRelease = !versionString.startsWith("dev");
40+
41+
public static final boolean versionMatches(String other) {
42+
String c = versionString;
43+
Pattern p = Pattern.compile("v[0-9]+.[0-9]+.[0-9]+");
44+
Matcher m = p.matcher(c);
45+
if (m.find()) {
46+
c = m.group(0);
47+
} else {
48+
return false;
49+
}
50+
m = p.matcher(other);
51+
if (m.find()) {
52+
other = m.group(0);
53+
} else {
54+
return false;
55+
}
56+
return c.equals(other);
57+
}
58+
}

0 commit comments

Comments
 (0)