Skip to content

Commit 2072c51

Browse files
committed
some debugging
1 parent 847f7e7 commit 2072c51

File tree

2 files changed

+19
-4
lines changed
  • photon-server/src/main/java/org/photonvision
  • photon-targeting/src/main/java/org/photonvision/common/hardware

2 files changed

+19
-4
lines changed

photon-server/src/main/java/org/photonvision/Main.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,13 @@ public static void main(String[] args) {
179179
+ (Platform.isRaspberryPi() ? (" (Pi " + PiVersion.getPiVersion() + ")") : ""));
180180

181181
if (Platform.isSystemCore()) {
182+
logger.error(
183+
"SystemCore is not a supported platform for PhotonVision!\n "
184+
+ "PhotonVision will now proceed to uninstall itself from this device.\n"
185+
+ "Please visit https://docs.photonvision.org/en/stable/docs/quick-start/common-setups.html#Unsupported-devices for more information.");
186+
182187
File jarLocation = getJarLocation();
183188
if (jarLocation == null) {
184-
logger.error("SystemCore is not a supported platform for PhotonVision!");
185189
System.exit(1);
186190
}
187191
// Make a file where the PV JAR is located indicating systemcore is not supported
@@ -191,7 +195,8 @@ public static void main(String[] args) {
191195
try (FileWriter writer = new FileWriter(notSupportedFile)) {
192196
writer.write("SystemCore is not a supported platform for PhotonVision.\n");
193197
writer.write("PhotonVision has been uninstalled from this device.\n");
194-
writer.write("Please visit https://docs.photonvision.org/en/stable/docs/quick-start/common-setups.html#Unsupported-devices for more information.");
198+
writer.write(
199+
"Please visit https://docs.photonvision.org/en/stable/docs/quick-start/common-setups.html#Unsupported-devices for more information.");
195200
}
196201
} catch (IOException e) {
197202
logger.error("Failed to create SystemCore not supported file", e);

photon-targeting/src/main/java/org/photonvision/common/hardware/Platform.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ public enum Platform {
4444
true,
4545
OSType.LINUX,
4646
true), // Raspberry Pi 3/4 with a 64-bit image
47+
LINUX_SYSTEMCORE(
48+
"Linux Systemcore 64-bit NOT SUPPORTED",
49+
Platform::getUnknownModel,
50+
"linuxx64",
51+
false,
52+
OSType.LINUX,
53+
false), // SystemCore 64-bit
4754
LINUX_RK3588_64(
4855
"Linux AARCH 64-bit with RK3588",
4956
Platform::getLinuxDeviceTreeModel,
@@ -125,7 +132,8 @@ public static boolean isRK3588() {
125132
}
126133

127134
public static boolean isSystemCore() {
128-
return new File("/home/systemcore").exists();
135+
File sysCore = new File("/home/systemcore");
136+
return sysCore.exists();
129137
}
130138

131139
public static boolean isRaspberryPi() {
@@ -198,7 +206,9 @@ public static Platform getCurrentPlatform() {
198206
}
199207

200208
if (OS_NAME.startsWith("Linux")) {
201-
if (isPiSBC()) {
209+
if (isSystemCore()) {
210+
return LINUX_SYSTEMCORE;
211+
} else if (isPiSBC()) {
202212
if (OS_ARCH.equals("arm") || OS_ARCH.equals("arm32")) {
203213
return LINUX_RASPBIAN32;
204214
} else if (OS_ARCH.equals("aarch64") || OS_ARCH.equals("arm64")) {

0 commit comments

Comments
 (0)