diff --git a/src/languages/en.json b/src/languages/en.json
index aaea101..0b7dd4a 100644
--- a/src/languages/en.json
+++ b/src/languages/en.json
@@ -100,7 +100,9 @@
"autoStart": "Start connection on open",
"autoOff": "Turn off trackers on exit",
"trackerVisualizationFPS": "Tracker visualization FPS",
- "heartbeat": "Tracker heartbeat interval"
+ "heartbeat": "Tracker heartbeat interval",
+ "serverAddress": "SlimeVR server address",
+ "serverPort": "SlimeVR server port"
},
"updates": {
"title": "Update checking",
diff --git a/src/main.ts b/src/main.ts
index b502002..8d52b9b 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -40,6 +40,8 @@ let firstLaunch = false;
let isClosing = false;
let hasInitializedLogDir = false;
let foundSlimeVR = false;
+let serverAddress = "255.255.255.255";
+let serverPort = 6969;
let canLogToFile = true;
let loggingMode = 1;
@@ -86,6 +88,9 @@ try {
updateChannel = config.global?.updates?.updateChannel ?? "stable";
heartbeatInterval = config.global?.trackers?.heartbeatInterval ?? 2000;
loggingMode = config.global?.debug?.loggingMode ?? 1;
+
+ serverAddress = config.global?.serverAddress ?? "255.255.255.255";
+ serverPort = config.global?.serverPort ?? 6969;
} catch (err) {
// If the config file doesn't exist or is empty, create it
log("First launch, creating config file and showing onboarding screen (after load)");
@@ -637,6 +642,16 @@ ipcMain.on("set-auto-off", (_event, arg) => {
log(`Auto-off set to: ${arg}`, "settings");
});
+ipcMain.on("set-server-address", (_event, arg) => {
+ serverAddress = arg;
+ log(`Server address set to: ${arg}`, "settings");
+});
+
+ipcMain.on("set-server-port", (_event, arg) => {
+ serverPort = arg;
+ log(`Server port set to: ${arg}`, "settings");
+});
+
ipcMain.on("open-support-page", async () => {
await shell.openExternal("https://github.com/OCSYT/SlimeTora/wiki/FAQ#i-found-an-issuebug");
});
@@ -1194,7 +1209,9 @@ async function processQueue() {
`SlimeTora v${app.getVersion()}`,
new FirmwareFeatureFlags(new Map([])),
BoardType.HARITORA,
- MCUType.HARITORA
+ MCUType.HARITORA,
+ serverAddress,
+ serverPort
);
await newTracker.init();
@@ -1650,11 +1667,14 @@ const heartbeatTracker = new EmulatedTracker(
`SlimeTora v${app.getVersion()} heartbeat`,
new FirmwareFeatureFlags(new Map([])),
BoardType.HARITORA,
- MCUType.HARITORA
+ MCUType.HARITORA,
+ serverAddress,
+ serverPort
);
setupTrackerEvents(heartbeatTracker, true);
await heartbeatTracker.init();
+log(`Looking for SlimeVR server on: ${serverAddress}:${serverPort}`, "connection");
/*
* Logging
diff --git a/src/static/html/index.html b/src/static/html/index.html
index 4e16228..f119b8f 100644
--- a/src/static/html/index.html
+++ b/src/static/html/index.html
@@ -432,6 +432,43 @@
Other s
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -728,6 +765,7 @@
+