Replace /home/lvuser with /home/systemcore (#8002)

This commit is contained in:
Thad House
2025-06-02 16:42:56 -07:00
committed by GitHub
parent 4d74ea6278
commit 2af8c59858
25 changed files with 139 additions and 147 deletions

View File

@@ -29,7 +29,7 @@ import java.util.Random;
* Centralized data log that provides automatic data log file management. It automatically cleans up
* old files when disk space is low and renames the file based either on current date/time or (if
* available) competition match number. The data file will be saved to a USB flash drive in a folder
* named "logs" if one is attached, or to /home/lvuser/logs otherwise.
* named "logs" if one is attached, or to /home/systemcore/logs otherwise.
*
* <p>Log files are initially named "FRC_TBD_{random}.wpilog" until the DS connects. After the DS
* connects, the log file is renamed to "FRC_yyyyMMdd_HHmmss.wpilog" (where the date/time is UTC).
@@ -251,17 +251,11 @@ public final class DataLogManager {
} catch (IOException ex) {
// ignored
}
if (RobotBase.getRuntimeType() == RuntimeType.kRoboRIO) {
DriverStation.reportWarning(
"DataLogManager: Logging to RoboRIO 1 internal storage is not recommended!"
+ " Plug in a FAT32 formatted flash drive!",
false);
}
if (!new File("/home/lvuser/logs").mkdir()) {
if (!new File("/home/systemcore/logs").mkdir()) {
// ignored
}
HAL.reportUsage("DataLogManager", "Onboard");
return "/home/lvuser/logs";
return "/home/systemcore/logs";
}
String logDir = Filesystem.getOperatingDirectory().getAbsolutePath() + "/logs";
if (!new File(logDir).mkdir()) {
@@ -297,7 +291,7 @@ public final class DataLogManager {
private static void startConsoleLog() {
if (RobotBase.isReal()) {
m_consoleLogger = new FileLogger("/home/lvuser/FRC_UserProgram.log", m_log, "console");
m_consoleLogger = new FileLogger("/home/systemcore/FRC_UserProgram.log", m_log, "console");
}
}

View File

@@ -10,8 +10,8 @@ import java.io.File;
* Class for interacting with the Filesystem, particularly, interacting with FRC-related paths on
* the system, such as the launch and deploy directories.
*
* <p>This class is primarily used for obtaining resources in src/main/deploy, and the RoboRIO path
* /home/lvuser in a simulation-compatible way.
* <p>This class is primarily used for obtaining resources in src/main/deploy, and the systemcore
* path /home/systemcore in a simulation-compatible way.
*/
public final class Filesystem {
private Filesystem() {}
@@ -33,14 +33,14 @@ public final class Filesystem {
}
/**
* Obtains the operating directory of the program. On the roboRIO, this is /home/lvuser. In
* Obtains the operating directory of the program. On the systemcore, this is /home/systemcore. In
* simulation, it is where the simulation was launched from (`pwd`).
*
* @return The operating directory
*/
public static File getOperatingDirectory() {
if (!RobotBase.isSimulation()) {
return new File("/home/lvuser");
return new File("/home/systemcore");
} else {
return getLaunchDirectory();
}
@@ -48,8 +48,8 @@ public final class Filesystem {
/**
* Obtains the 'deploy' directory of the program, located at src/main/deploy, which is deployed by
* default. On the roboRIO, this is /home/lvuser/deploy. In simulation, it is where the simulation
* was launched from, in the subdirectory "src/main/deploy" (`pwd`/src/main/deploy).
* default. On the systemcore, this is /home/systemcore/deploy. In simulation, it is where the
* simulation was launched from, in the subdirectory "src/main/deploy" (`pwd`/src/main/deploy).
*
* @return The 'deploy' directory
*/

View File

@@ -99,7 +99,7 @@ public abstract class RobotBase implements AutoCloseable {
// subscribe to "" to force persistent values to propagate to local
m_suball = new MultiSubscriber(inst, new String[] {""});
if (!isSimulation()) {
inst.startServer("/home/lvuser/networktables.json");
inst.startServer("/home/systemcore/networktables.json");
} else {
inst.startServer();
}
@@ -168,7 +168,7 @@ public abstract class RobotBase implements AutoCloseable {
*/
public static boolean isReal() {
RuntimeType runtimeType = getRuntimeType();
return runtimeType == RuntimeType.kRoboRIO || runtimeType == RuntimeType.kRoboRIO2;
return runtimeType == RuntimeType.kSystemCore;
}
/**