Skip to content

Commit af02b77

Browse files
committed
Return empty string if MAC address couldn't be found
1 parent 7634ba0 commit af02b77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NetworkTablesManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private void checkHostnameAndCameraNames() {
257257
kCoprocTable.getSubTable(currentMacAddress).getEntry("cameraNames").unpublish();
258258
currentMacAddress = mac;
259259
}
260-
if (mac.equals("00-00-00-00-00-00")) {
260+
if (mac.isEmpty()) {
261261
logger.error("Cannot check hostname and camera names, MAC address is not set!");
262262
return;
263263
}

photon-core/src/main/java/org/photonvision/common/networking/NetworkUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public static String getMacAddress() {
267267
} catch (Exception e) {
268268
logger.error("Error getting MAC address", e);
269269
}
270-
return "00-00-00-00-00-00";
270+
return "";
271271
}
272272

273273
private static String formatMacAddress(byte[] mac) {

0 commit comments

Comments
 (0)