-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f760163
commit 20b21ce
Showing
18 changed files
with
107 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...tCore/src/main/java/org/firstinspires/ftc/robotcore/external/navigation/DistanceUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.firstinspires.ftc.robotcore.external.navigation; | ||
|
||
public class DistanceUnit { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
rootProject.name = 'AprilTagDesktop' | ||
include 'RobotCore' | ||
|
||
include 'example' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package io.github.deltacv.apriltag; | ||
|
||
class SystemUtil { | ||
|
||
public enum OperatingSystem { | ||
WINDOWS, LINUX, MACOS, UNKNOWN | ||
} | ||
|
||
public enum Architecture { | ||
AMD64("amd64"), ARM64("arm64"), UNKNOWN(""); | ||
|
||
public final String suffix; | ||
|
||
Architecture(String suffix) { | ||
this.suffix = suffix; | ||
} | ||
} | ||
|
||
private SystemUtil() { } | ||
|
||
|
||
|
||
public static OperatingSystem getOS() { | ||
String osName = System.getProperty("os.name").toLowerCase(); | ||
|
||
if (osName.contains("win")) { | ||
return OperatingSystem.WINDOWS; | ||
} else if (osName.contains("nux")) { | ||
return OperatingSystem.LINUX; | ||
} else if (osName.contains("mac") || osName.contains("darwin")) { | ||
return OperatingSystem.MACOS; | ||
} | ||
|
||
return OperatingSystem.UNKNOWN; | ||
} | ||
|
||
public static Architecture getArch() { | ||
String arch = System.getProperty("os.arch").toLowerCase(); | ||
|
||
if(arch.equals("aarch64") || arch.contains("arch") || arch.contains("arm")) { | ||
return Architecture.ARM64; | ||
} else if(arch.equals("amd64") || arch.contains("64") || arch.contains("x86_64")) { | ||
return Architecture.AMD64; | ||
} else { | ||
return Architecture.UNKNOWN; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters