mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-23 10:31:24 -08:00
Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81a46c2ea5 | ||
|
|
1006b32e83 | ||
|
|
dd39621a30 | ||
|
|
0f9a001f17 | ||
|
|
f94ac3d1b6 | ||
|
|
246342d7b7 | ||
|
|
a29ad7c4d2 | ||
|
|
b522c82af3 | ||
|
|
4b239e892e | ||
|
|
bcc139ecc9 | ||
|
|
0d2c2e4a5c | ||
|
|
3d18eae168 | ||
|
|
f1e3be0aec | ||
|
|
bc46269c24 | ||
|
|
905c5a4514 |
No files matched your search
+5
-2
@@ -1,3 +1,6 @@
|
||||
# Global code owner
|
||||
* @Eirenliel
|
||||
|
||||
# Make everyone be able to approve SolarXR submodule changes
|
||||
/solarxr-protocol @ButterscotchV @Erimelowo @loucass003
|
||||
|
||||
@@ -13,11 +16,11 @@
|
||||
|
||||
/gui/src/components/settings/ @Erimelowo @loucass003
|
||||
|
||||
# Electron part of the GUI
|
||||
# Rust part of the GUI
|
||||
/gui/electron/ @loucass003
|
||||
|
||||
# Some server code~
|
||||
/server/ @ButterscotchV @loucass003 @Erimelowo
|
||||
/server/ @ButterscotchV @Eirenliel @Erimelowo
|
||||
|
||||
/server/src/main/java/dev/slimevr/autobone/ @ButterscotchV
|
||||
/server/src/main/java/dev/slimevr/poserecorder/ @ButterscotchV
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
"Area: Continuous Integration":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ".github/**"
|
||||
"Area: Application Protocol":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["solarxr-protocol"]
|
||||
"Area: AutoBone":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/core/src/main/java/dev/slimevr/autobone/**"
|
||||
"Area: Documentation":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "**/*.md"
|
||||
"Area: GUI":
|
||||
- all:
|
||||
- changed-files:
|
||||
- all-globs-to-any-file: ["gui/**/*", "!gui/public/i18n/**/*"]
|
||||
"Area: Hardware Protocol":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/core/src/main/java/dev/slimevr/tracking/trackers/udp/**"
|
||||
"Area: Server":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["server/**", "*gradle*", "gradle/**"]
|
||||
"Area: Skeletal Model":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/core/src/main/java/dev/slimevr/tracking/processor/**"
|
||||
"Area: SteamVR Driver":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/desktop/src/main/java/dev/slimevr/desktop/platform/**"
|
||||
"Area: Translation":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "gui/public/i18n/**"
|
||||
"Area: VMC":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["server/core/src/main/java/dev/slimevr/osc/Unity*", "server/core/src/main/java/dev/slimevr/osc/VMC*", "server/core/src/main/java/dev/slimevr/osc/VRM*"]
|
||||
"Area: VRCOSC":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["server/core/src/main/java/dev/slimevr/osc/VRC*"]
|
||||
@@ -0,0 +1,22 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||
# file with configuration. For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v6
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
Generated
+9
-9
@@ -5,11 +5,11 @@
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777988971,
|
||||
"narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=",
|
||||
"lastModified": 1762980239,
|
||||
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff",
|
||||
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1777954456,
|
||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||
"lastModified": 1756787288,
|
||||
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -36,11 +36,11 @@
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1777168982,
|
||||
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=",
|
||||
"lastModified": 1761765539,
|
||||
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14",
|
||||
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -6,77 +6,28 @@
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
...
|
||||
}:
|
||||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
perSystem = { pkgs, ... }:
|
||||
let
|
||||
runtimeLibs =
|
||||
pkgs:
|
||||
(with pkgs; [
|
||||
jdk17
|
||||
runtimeLibs = pkgs: (with pkgs; [
|
||||
jdk17
|
||||
|
||||
alsa-lib
|
||||
libpulseaudio
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libnotify
|
||||
libxkbcommon
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
systemd
|
||||
vulkan-loader
|
||||
wayland
|
||||
libX11
|
||||
libXcomposite
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXrandr
|
||||
libxcb
|
||||
libxshmfence
|
||||
libusb1
|
||||
udev
|
||||
libxcrypt-legacy
|
||||
rpm
|
||||
fpm
|
||||
alsa-lib libpulseaudio at-spi2-atk at-spi2-core cairo cups dbus expat
|
||||
gdk-pixbuf glib gtk3 libdrm libgbm libglvnd libnotify
|
||||
libxkbcommon mesa nspr nss pango systemd vulkan-loader
|
||||
wayland xorg.libX11 xorg.libXcomposite xorg.libXdamage
|
||||
xorg.libXext xorg.libXfixes xorg.libXrandr xorg.libxcb
|
||||
xorg.libxshmfence libusb1 udev libxcrypt-legacy
|
||||
rpm fpm
|
||||
|
||||
wineWow64Packages.stable
|
||||
zlib
|
||||
squashfsTools
|
||||
fakeroot
|
||||
libarchive
|
||||
icu
|
||||
nodejs_22
|
||||
pnpm
|
||||
pkg-config
|
||||
python3
|
||||
gcc
|
||||
gnumake
|
||||
binutils
|
||||
git
|
||||
node-gyp-build
|
||||
]);
|
||||
wineWow64Packages.stable
|
||||
zlib squashfsTools fakeroot libarchive icu
|
||||
nodejs_22 pnpm pkg-config python3 gcc gnumake binutils git
|
||||
pkgs.nodePackages.node-gyp-build
|
||||
]);
|
||||
|
||||
slimeShell = pkgs.buildFHSEnv {
|
||||
name = "slimevr-env";
|
||||
|
||||
@@ -20,7 +20,3 @@ buildconfigVersion=6.0.7
|
||||
# We should probably stop using grgit, see:
|
||||
# https://andrewoberstar.com/posts/2024-04-02-dont-commit-to-grgit/
|
||||
grgitVersion=5.3.3
|
||||
|
||||
# Fix gradle leaving multiple java processes running that accumulate and use multiple GBs of RAM
|
||||
# This mostly seems to affect it when running from console, and then sending a SIGINT (Ctrl + C)
|
||||
org.gradle.daemon.idletimeout=10000
|
||||
+22
-16
@@ -1,15 +1,21 @@
|
||||
import { defineConfig } from 'electron-vite';
|
||||
import { resolve } from 'path';
|
||||
import rendererConfig from './vite.config'; // Import your existing React config
|
||||
import { defineConfig } from 'electron-vite'
|
||||
import { resolve } from 'path'
|
||||
import rendererConfig from './vite.config' // Import your existing React config
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: resolve(__dirname, 'electron/main/index.ts'),
|
||||
external: ['pino', 'pino-pretty', 'pino-roll', 'commander', 'open'],
|
||||
},
|
||||
},
|
||||
external: [
|
||||
'pino',
|
||||
'pino-pretty',
|
||||
'pino-roll',
|
||||
'commander',
|
||||
'open'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
preload: {
|
||||
build: {
|
||||
@@ -17,12 +23,12 @@ export default defineConfig({
|
||||
input: resolve(__dirname, 'electron/preload/index.ts'),
|
||||
output: {
|
||||
format: 'cjs', // Force CJS for the preload
|
||||
entryFileNames: 'index.js', // Change back to .js
|
||||
},
|
||||
},
|
||||
},
|
||||
entryFileNames: 'index.js' // Change back to .js
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
renderer: {
|
||||
renderer: {
|
||||
...rendererConfig,
|
||||
root: '.',
|
||||
build: {
|
||||
@@ -34,8 +40,8 @@ export default defineConfig({
|
||||
transformMixedEsModules: true,
|
||||
},
|
||||
rollupOptions: {
|
||||
input: resolve(__dirname, 'index.html'),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
input: resolve(__dirname, 'index.html')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
+22
-29
@@ -29,6 +29,7 @@ import {
|
||||
} from './paths';
|
||||
import { initStores } from './store';
|
||||
import { closeLogger, logger } from './logger';
|
||||
|
||||
import { spawn } from 'node:child_process';
|
||||
import { discordPresence } from './presence';
|
||||
import { options } from './cli';
|
||||
@@ -155,8 +156,9 @@ handleIpc(IPC_CHANNELS.STORAGE, async (e, { type, method, key, value }) => {
|
||||
|
||||
handleIpc(IPC_CHANNELS.DISCORD_PRESENCE, async (e, options) => {
|
||||
if (options.enable) {
|
||||
if (!discordPresence.state.ready) await discordPresence.connect();
|
||||
discordPresence.updateActivity(options.activity, options.iconText);
|
||||
if (!discordPresence.state.ready)
|
||||
await discordPresence.connect();
|
||||
discordPresence.updateActivity(options.activity);
|
||||
} else if (discordPresence.state.ready) {
|
||||
discordPresence.destroy();
|
||||
}
|
||||
@@ -191,10 +193,6 @@ handleIpc(IPC_CHANNELS.GET_FOLDER, (e, folder) => {
|
||||
}
|
||||
});
|
||||
|
||||
handleIpc(IPC_CHANNELS.IS_STEAM, () => {
|
||||
return options.steam;
|
||||
});
|
||||
|
||||
const defaultWindowState: {
|
||||
width: number;
|
||||
height: number;
|
||||
@@ -210,11 +208,11 @@ const defaultWindowState: {
|
||||
const windowState = await readFile(getWindowStateFile(), {
|
||||
encoding: 'utf-8',
|
||||
})
|
||||
.then((data) => JSON.parse(data))
|
||||
.catch(() => {
|
||||
logger.error('Failed to load window state, using defaults');
|
||||
return defaultWindowState;
|
||||
});
|
||||
.then(data => JSON.parse(data))
|
||||
.catch(() => {
|
||||
logger.error('Failed to load window state, using defaults');
|
||||
return defaultWindowState;
|
||||
});
|
||||
|
||||
const MIN_WIDTH = 393;
|
||||
const MIN_HEIGHT = 667;
|
||||
@@ -247,9 +245,7 @@ function validateWindowState(state: typeof defaultWindowState) {
|
||||
|
||||
const saveWindowState = async () => {
|
||||
await mkdir(dirname(getWindowStateFile()), { recursive: true });
|
||||
await writeFile(getWindowStateFile(), JSON.stringify(windowState), {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
await writeFile(getWindowStateFile(), JSON.stringify(windowState), { encoding: 'utf-8' });
|
||||
};
|
||||
|
||||
function createWindow() {
|
||||
@@ -297,8 +293,10 @@ function createWindow() {
|
||||
mainWindow.minimize();
|
||||
break;
|
||||
case 'toggle-maximize':
|
||||
if (mainWindow.isMaximized()) mainWindow.unmaximize();
|
||||
else mainWindow.maximize();
|
||||
if (mainWindow.isMaximized())
|
||||
mainWindow.unmaximize();
|
||||
else
|
||||
mainWindow.maximize();
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -405,7 +403,7 @@ const spawnServer = async () => {
|
||||
'SlimeVR',
|
||||
`Couldn't find a compatible Java version, please download Java 17 or higher`
|
||||
);
|
||||
app.quit();
|
||||
app.quit()
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -427,9 +425,7 @@ const spawnServer = async () => {
|
||||
? {
|
||||
...process.env,
|
||||
APPDATA: app.getPath('appData'),
|
||||
LOCALAPPDATA: process.env['USERPROFILE']
|
||||
? path.join(process.env['USERPROFILE'], 'AppData', 'Local')
|
||||
: undefined,
|
||||
LOCALAPPDATA: process.env['USERPROFILE'] ? path.join(process.env['USERPROFILE'], 'AppData', 'Local') : undefined,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
@@ -451,11 +447,11 @@ const spawnServer = async () => {
|
||||
serverProcess.on('error', (err) => {
|
||||
logger.info({ err }, 'Error launching the java server');
|
||||
if (!isQuitting) app.quit();
|
||||
});
|
||||
})
|
||||
|
||||
serverProcess.on('exit', () => {
|
||||
logger.info('Server process exiting');
|
||||
});
|
||||
})
|
||||
|
||||
const exited = new Promise<void>((resolve) => serverProcess.once('exit', resolve));
|
||||
|
||||
@@ -469,7 +465,8 @@ const spawnServer = async () => {
|
||||
const createFolders = async () => {
|
||||
await mkdir(getServerDataFolder(), { recursive: true });
|
||||
await mkdir(getGuiDataFolder(), { recursive: true });
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
let isQuitting = false;
|
||||
|
||||
@@ -480,6 +477,7 @@ app.whenReady().then(async () => {
|
||||
return net.fetch(pathToFileURL(filePath).toString(), { headers: request.headers });
|
||||
});
|
||||
|
||||
|
||||
try {
|
||||
await createFolders();
|
||||
} catch (err) {
|
||||
@@ -492,6 +490,7 @@ app.whenReady().then(async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
stores = await initStores();
|
||||
checkEnvironmentVariables();
|
||||
const server = await spawnServer();
|
||||
@@ -500,12 +499,6 @@ app.whenReady().then(async () => {
|
||||
|
||||
logger.info('SlimeVR started!');
|
||||
|
||||
process.on('exit', async (code) => {
|
||||
console.log(code);
|
||||
server?.close();
|
||||
await server?.waitForExit();
|
||||
});
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
app.quit();
|
||||
});
|
||||
|
||||
@@ -28,13 +28,12 @@ export const richPresence = () => {
|
||||
logger.error(e, 'Unable to connect to Discord RPC');
|
||||
}
|
||||
},
|
||||
updateActivity: (content: string, iconText: string | undefined) => {
|
||||
updateActivity: (content: string) => {
|
||||
if (!state.ready) return;
|
||||
client.user
|
||||
?.setActivity({
|
||||
state: content,
|
||||
largeImageKey: 'icon',
|
||||
largeImageText: iconText,
|
||||
startTimestamp: state.start,
|
||||
})
|
||||
.catch((e) => {
|
||||
|
||||
@@ -14,8 +14,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
close: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'close'),
|
||||
hide: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'hide'),
|
||||
minimize: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'minimize'),
|
||||
toggleMaximize: () =>
|
||||
ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'toggle-maximize'),
|
||||
toggleMaximize: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'toggle-maximize'),
|
||||
getStorage: async (type) => {
|
||||
return {
|
||||
get: (key) =>
|
||||
@@ -33,19 +32,10 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
setTranslations: () => {},
|
||||
openDialog: (options) => ipcRenderer.invoke(IPC_CHANNELS.OPEN_DIALOG, options),
|
||||
saveDialog: (options) => ipcRenderer.invoke(IPC_CHANNELS.SAVE_DIALOG, options),
|
||||
openConfigFolder: async () =>
|
||||
ipcRenderer.invoke(
|
||||
IPC_CHANNELS.OPEN_FILE,
|
||||
await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'config')
|
||||
),
|
||||
openLogsFolder: async () =>
|
||||
ipcRenderer.invoke(
|
||||
IPC_CHANNELS.OPEN_FILE,
|
||||
await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'logs')
|
||||
),
|
||||
openConfigFolder: async () => ipcRenderer.invoke(IPC_CHANNELS.OPEN_FILE, await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'config')),
|
||||
openLogsFolder: async () => ipcRenderer.invoke(IPC_CHANNELS.OPEN_FILE, await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'logs')),
|
||||
openFile: (path) => ipcRenderer.invoke(IPC_CHANNELS.OPEN_FILE, path),
|
||||
ghGet: (req) => ipcRenderer.invoke(IPC_CHANNELS.GH_FETCH, req),
|
||||
setPresence: (options) => ipcRenderer.invoke(IPC_CHANNELS.DISCORD_PRESENCE, options),
|
||||
getInstallDir: () => ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'exe'),
|
||||
isSteam: () => ipcRenderer.invoke(IPC_CHANNELS.IS_STEAM),
|
||||
} satisfies IElectronAPI);
|
||||
Vendored
+1
-4
@@ -34,9 +34,7 @@ export type GHReturn = {
|
||||
| null;
|
||||
};
|
||||
|
||||
export type DiscordPresence =
|
||||
| { enable: false }
|
||||
| { enable: true; activity: string; iconText: string | undefined };
|
||||
export type DiscordPresence = { enable: false } | { enable: true, activity: string }
|
||||
|
||||
export interface IElectronAPI {
|
||||
onServerStatus: (cb: (data: ServerStatusEvent) => void) => () => void;
|
||||
@@ -59,7 +57,6 @@ export interface IElectronAPI {
|
||||
ghGet: <T extends GHGet>(options: T) => Promise<GHReturn[T['type']]>;
|
||||
setPresence: (options: DiscordPresence) => void;
|
||||
getInstallDir: () => Promise<string>;
|
||||
isSteam: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
@@ -19,8 +19,7 @@ export const IPC_CHANNELS = {
|
||||
OPEN_FILE: 'open-file',
|
||||
GET_FOLDER: 'get-folder',
|
||||
GH_FETCH: 'gh-fetch',
|
||||
DISCORD_PRESENCE: 'discord-presence',
|
||||
IS_STEAM: 'is-steam',
|
||||
DISCORD_PRESENCE: 'discord-presence'
|
||||
} as const;
|
||||
|
||||
export interface IpcInvokeMap {
|
||||
@@ -49,5 +48,4 @@ export interface IpcInvokeMap {
|
||||
options: T
|
||||
) => Promise<GHReturn[T['type']]>;
|
||||
[IPC_CHANNELS.DISCORD_PRESENCE]: (options: DiscordPresence) => void;
|
||||
[IPC_CHANNELS.IS_STEAM]: () => boolean;
|
||||
}
|
||||
@@ -635,9 +635,6 @@ settings-general-fk_settings-enforce_joint_constraints-correct_constraints-descr
|
||||
settings-general-fk_settings-ik = Position data
|
||||
settings-general-fk_settings-ik-use_position = Use Position data
|
||||
settings-general-fk_settings-ik-use_position-description = Enables the use of position data from trackers that provide it. When enabling this make sure to full reset and recalibrate in game.
|
||||
settings-general-fk_settings-velocity_settings = Velocity Settings
|
||||
settings-general-fk_settings-velocity_settings-description = Send derived velocity data to SteamVR. Required for Natural Locomotion support. May cause jitter in FBT.
|
||||
settings-general-fk_settings-velocity_settings-send_derived_velocity = Send derived velocity to driver
|
||||
settings-general-fk_settings-arm_fk = Arm tracking
|
||||
settings-general-fk_settings-arm_fk-description = Force arms to be tracked from the headset (HMD) even if positional hand data is available.
|
||||
settings-general-fk_settings-arm_fk-force_arms = Force arms from HMD
|
||||
@@ -674,7 +671,7 @@ settings-general-fk_settings-self_localization-description = Mocap Mode allows t
|
||||
## Gesture control settings (tracker tapping)
|
||||
settings-general-gesture_control = Gesture control
|
||||
settings-general-gesture_control-subtitle = Tap based resets
|
||||
settings-general-gesture_control-description = Allows for resets to be triggered by tapping a tracker. Taps must occur within the time limit of 0.3 seconds times the number of taps to be recognized.
|
||||
settings-general-gesture_control-description = Allows for resets to be triggered by tapping a tracker. The tracker highest up on your torso is used for Yaw Reset, the tracker highest up on your left leg is used for Full Reset, and the tracker highest up on your right leg is used for Mounting Calibration. Taps must occur within the time limit of 0.3 seconds times the number of taps to be recognized.
|
||||
# This is a unit: 3 taps, 2 taps, 1 tap
|
||||
# $amount (Number) - Amount of taps (touches to the tracker's case)
|
||||
settings-general-gesture_control-taps = { $amount ->
|
||||
@@ -690,17 +687,12 @@ settings-general-gesture_control-trackers = { $amount ->
|
||||
settings-general-gesture_control-yawResetEnabled = Enable tap to yaw reset
|
||||
settings-general-gesture_control-yawResetDelay = Yaw reset delay
|
||||
settings-general-gesture_control-yawResetTaps = Taps for yaw reset
|
||||
settings-general-gesture_control-yawResetTracker = Yaw Reset Tracker
|
||||
settings-general-gesture_control-fullResetEnabled = Enable tap to full reset
|
||||
settings-general-gesture_control-fullResetDelay = Full reset delay
|
||||
settings-general-gesture_control-fullResetTaps = Taps for full reset
|
||||
settings-general-gesture_control-fullResetTracker = Full Reset Tracker
|
||||
settings-general-gesture_control-mountingResetEnabled = Enable tap to perform mounting calibration
|
||||
settings-general-gesture_control-mountingResetDelay = Mounting calibration delay
|
||||
settings-general-gesture_control-mountingResetTaps = Taps for mounting calibration
|
||||
settings-general-gesture_control-mountingResetTracker = Mounting Reset Tracker
|
||||
settings-general-gesture_control-yawResetTracker-title = Yaw Reset Tracker
|
||||
settings-general-gesture_control-fullResetTracker-title = Full Reset Tracker
|
||||
# The number of trackers that can have higher acceleration before a tap is rejected
|
||||
settings-general-gesture_control-numberTrackersOverThreshold = Trackers over threshold
|
||||
settings-general-gesture_control-numberTrackersOverThreshold-description = Increase this value if tap detection is not working. Do not increase it above what is needed to make tap detection work as it would cause more false positives.
|
||||
|
||||
@@ -355,7 +355,6 @@ tracker-table-column-name = Nombre
|
||||
tracker-table-column-type = Tipo
|
||||
tracker-table-column-battery = Batería
|
||||
tracker-table-column-ping = Latencia
|
||||
tracker-table-column-packet_loss = Pérdida de paquetes
|
||||
tracker-table-column-tps = TPS
|
||||
tracker-table-column-temperature = Temp. °C
|
||||
tracker-table-column-linear-acceleration = Accel. X/Y/Z
|
||||
@@ -397,36 +396,33 @@ tracker-infos-magnetometer-status-v1 =
|
||||
[ENABLED] Habilitado
|
||||
*[NOT_SUPPORTED] No soportado
|
||||
}
|
||||
tracker-infos-packet_loss = Pérdida de paquetes
|
||||
tracker-infos-packets_lost = Paquetes perdidos
|
||||
tracker-infos-packets_received = Paquetes recibidos
|
||||
|
||||
## Tracker settings
|
||||
|
||||
tracker-settings-back = Volver a la lista de trackers
|
||||
tracker-settings-title = Ajustes de los trackers
|
||||
tracker-settings-back = Volver a la lista de sensores
|
||||
tracker-settings-title = Ajustes de los sensores
|
||||
tracker-settings-assignment_section = Asignación
|
||||
tracker-settings-assignment_section-description = Parte del cuerpo asignado al sensor.
|
||||
tracker-settings-assignment_section-edit = Editar asignación
|
||||
tracker-settings-mounting_section = Posición de montura
|
||||
tracker-settings-mounting_section-description = ¿Dónde está montado el tracker?
|
||||
tracker-settings-mounting_section-description = ¿Dónde está montado el sensor?
|
||||
tracker-settings-mounting_section-edit = Editar montura
|
||||
tracker-settings-drift_compensation_section = Permitir compensación de desviación
|
||||
tracker-settings-drift_compensation_section-description = ¿Este tracker debería compensar la desviación?
|
||||
tracker-settings-drift_compensation_section-description = ¿Este sensor deberia compensar la desviación?
|
||||
tracker-settings-drift_compensation_section-edit = Permitir compensación de desviación
|
||||
tracker-settings-use_mag = Permitir el uso del magnetómetro en este tracker
|
||||
# Multiline!
|
||||
tracker-settings-use_mag-description =
|
||||
¿Debería este tracker usar el magnetómetro para reducir la desviacion cuando se permite el uso del magnetómetro? <b>¡Por favor, no apagues tu tracker mientras alternas esto!</b>
|
||||
|
||||
|
||||
Primero debes permitir el uso del magnetómetro, <magSetting>haga clic aquí para ir al ajuste</magSetting>.
|
||||
tracker-settings-use_mag-label = Permitir el uso del magnetómetro
|
||||
# The .<name> means it's an attribute and it's related to the top key.
|
||||
# In this case that is the settings for the assignment section.
|
||||
tracker-settings-name_section = Nombre del tracker
|
||||
tracker-settings-name_section = Nombre del sensor
|
||||
tracker-settings-name_section-description = Dale un apodo bonito :)
|
||||
tracker-settings-name_section-placeholder = Pata izquierda de Manteca
|
||||
tracker-settings-name_section-label = Nombre del tracker
|
||||
tracker-settings-name_section-label = Nombre del sensor
|
||||
tracker-settings-forget = Olvidar tracker
|
||||
tracker-settings-forget-description = Remueve el tracker del servidor de SlimeVR y lo previene de conectarse hasta que el servidor se reinicie. La configuración del tracker no se perderá.
|
||||
tracker-settings-forget-label = Olvidar tracker
|
||||
@@ -448,11 +444,11 @@ tracker-part_card-unassigned = Sin asignar
|
||||
|
||||
## Body assignment menu
|
||||
|
||||
body_assignment_menu = ¿Dónde quieres que esté este tracker?
|
||||
body_assignment_menu-description = Selecciona la posición donde quieres asignar este tracker. También puedes escoger administrar todos los trackers al mismo tiempo en vez de uno por uno.
|
||||
body_assignment_menu = ¿Dónde quieres que esté este sensor?
|
||||
body_assignment_menu-description = Selecciona la posición donde quieres asignar este sensor. También puedes escoger administrar todos los sensores al mismo tiempo en vez de uno por uno.
|
||||
body_assignment_menu-show_advanced_locations = Mostrar posiciones de asignación avanzadas
|
||||
body_assignment_menu-manage_trackers = Administrar todos los trackers
|
||||
body_assignment_menu-unassign_tracker = Desasignar tracker
|
||||
body_assignment_menu-manage_trackers = Administrar todos los sensores
|
||||
body_assignment_menu-unassign_tracker = Desasignar sensor
|
||||
|
||||
## Tracker assignment menu
|
||||
|
||||
@@ -461,8 +457,8 @@ body_assignment_menu-unassign_tracker = Desasignar tracker
|
||||
#
|
||||
# We are using it here because english doesn't require changing the text in each case but
|
||||
# maybe your language does.
|
||||
-tracker_selection-part = ¿Qué tracker asignar a tu
|
||||
tracker_selection_menu-NONE = ¿Qué tracker quieres que esté sin asignar?
|
||||
-tracker_selection-part = ¿Qué sensor asignar a tu
|
||||
tracker_selection_menu-NONE = ¿Qué sensor quieres que esté sin asignar?
|
||||
tracker_selection_menu-HEAD = { -tracker_selection-part } cabeza?
|
||||
tracker_selection_menu-NECK = { -tracker_selection-part } cuello?
|
||||
tracker_selection_menu-RIGHT_SHOULDER = { -tracker_selection-part } hombro derecho?
|
||||
@@ -485,8 +481,8 @@ tracker_selection_menu-LEFT_UPPER_LEG = { -tracker_selection-part } muslo izquie
|
||||
tracker_selection_menu-LEFT_LOWER_LEG = { -tracker_selection-part } tobillo izquiero?
|
||||
tracker_selection_menu-LEFT_FOOT = { -tracker_selection-part } pie izquierdo?
|
||||
tracker_selection_menu-LEFT_CONTROLLER = { -tracker_selection-part } mando izquierdo?
|
||||
tracker_selection_menu-unassigned = Trackers sin asignar
|
||||
tracker_selection_menu-assigned = Trackers asignados
|
||||
tracker_selection_menu-unassigned = Sensores sin asignar
|
||||
tracker_selection_menu-assigned = Sensores asignados
|
||||
tracker_selection_menu-dont_assign = No asignar
|
||||
# This line cares about multilines.
|
||||
# <b>text</b> means that the text should be bold.
|
||||
@@ -498,7 +494,7 @@ tracker_selection_menu-neck_warning-cancel = Cancelar
|
||||
|
||||
## Mounting menu
|
||||
|
||||
mounting_selection_menu = ¿Dónde quieres colocar el tracker?
|
||||
mounting_selection_menu = ¿Dónde quieres colocar el sensor?
|
||||
mounting_selection_menu-close = Cerrar
|
||||
|
||||
## Sidebar settings
|
||||
@@ -506,13 +502,13 @@ mounting_selection_menu-close = Cerrar
|
||||
settings-sidebar-title = Ajustes
|
||||
settings-sidebar-general = General
|
||||
settings-sidebar-steamvr = SteamVR
|
||||
settings-sidebar-tracker_mechanics = Mecánicas del tracker
|
||||
settings-sidebar-tracker_mechanics = Mecánicas del sensor
|
||||
settings-sidebar-stay_aligned = Mantente Alineado
|
||||
settings-sidebar-fk_settings = Ajustes de FK
|
||||
settings-sidebar-gesture_control = Control de gestos
|
||||
settings-sidebar-interface = Interfaz
|
||||
settings-sidebar-osc_router = Router OSC
|
||||
settings-sidebar-osc_trackers = Trackers OSC de VRChat
|
||||
settings-sidebar-osc_trackers = Sensores OSC de VRChat
|
||||
settings-sidebar-osc_vmc = VMC
|
||||
settings-sidebar-utils = Utilidades
|
||||
settings-sidebar-serial = Consola serial
|
||||
@@ -582,12 +578,12 @@ settings-general-tracker_mechanics-drift_compensation-prediction = Compensación
|
||||
# This cares about multilines
|
||||
settings-general-tracker_mechanics-drift_compensation-prediction-description =
|
||||
Predice la desviación horizontal y compensa cuando esta mas allá del rango previamente medido.
|
||||
Activa esto si el tracker esta girando continuamente en el eje horizontal.
|
||||
Activa esto si el sensor esta girando continuamente en el eje horizontal.
|
||||
settings-general-tracker_mechanics-drift_compensation-prediction-label = Compensación mediante la predicción del desvío
|
||||
settings-general-tracker_mechanics-drift_compensation_warning =
|
||||
<b>Advertencia:</b> Solo usa la compensación de desviación si necesitas reiniciar
|
||||
muy seguido (cada ~5-10 minutos).
|
||||
|
||||
|
||||
Algunos IMUs propensos a reinicios frecuentes incluyen:
|
||||
Joy-Cons, owoTrack y MPU (sin un firmware reciente).
|
||||
settings-general-tracker_mechanics-drift_compensation_warning-cancel = Cancelar
|
||||
@@ -604,9 +600,6 @@ settings-general-tracker_mechanics-use_mag_on_all_trackers-description =
|
||||
Usa el magnetómetro en todos los trackers que tienen un firmware compatible, lo que reduce la desviación en entornos magnéticos estables.
|
||||
Se puede desactivar por sensor en la configuración del sensor. <b>¡Por favor, no apagues ninguno de los trackers mientras activas esta opción!</b>
|
||||
settings-general-tracker_mechanics-use_mag_on_all_trackers-label = Usar magnetómetro en trackers
|
||||
settings-general-tracker_mechanics-trackers_over_usb = Trackers por USB
|
||||
settings-general-tracker_mechanics-trackers_over_usb-description = Permite recibir datos de trackers HID por USB. ¡Asegúrate de que los trackers conectados tengan <b>conexión por HID</b> activados!
|
||||
settings-general-tracker_mechanics-trackers_over_usb-enabled-label = Permite a los trackers HID conectarse directamente por USB
|
||||
settings-stay_aligned = Mantente Alineado
|
||||
settings-stay_aligned-description = Mantente Alineado reduce el desvío ajustando gradualmente tus trackers para calzar tus poses relajadas.
|
||||
settings-stay_aligned-setup-label = Configurar Mantente Alineado
|
||||
@@ -779,9 +772,9 @@ settings-general-interface-discord_presence-message =
|
||||
settings-interface-behavior-error_tracking = Recopilación de errores a través de Sentry.io
|
||||
settings-interface-behavior-error_tracking-description_v2 =
|
||||
<h1>Consientes a la recopilación de datos de errores anonimizados?</h1>
|
||||
|
||||
|
||||
<b>No recopilamos información personal</b> como tu dirección IP o credenciales del Wi-Fi. ¡SlimeVR respeta tu privacidad!
|
||||
|
||||
|
||||
Para proveer la mejor experiencia de usuario, recopilamos reportes de errores anonimizados, métricas de rendimiento, e información del sistema operativo. Esto nos ayuda a detectar errores y problemas con SlimeVR. Estas métricas son recopiladas a través de Sentry.io.
|
||||
settings-interface-behavior-error_tracking-label = Enviar errores a los desarrolladores
|
||||
settings-interface-behavior-bvh_directory = Carpeta para guardar grabaciones de BVH
|
||||
@@ -849,7 +842,7 @@ settings-osc-vrchat-description-v1 =
|
||||
Cambia los ajustes específicos de los trackers OSC utilizados para enviar
|
||||
datos de seguimiento a aplicaciones sin SteamVR (ej. VRChat en Quest).
|
||||
Asegúrate de activar OSC en VRChat a través del menú Acción en OSC > Activado.
|
||||
Para permitir la recepción de datos del HMD y de los mandos desde VRChat, ve a los ajustes de tu menú principal
|
||||
Para permitir la recepción de datos del HMD y de los mandos desde VRChat, ve a los ajustes de tu menú principal
|
||||
en Tracking & IK > Permitir el envío de datos OSC de seguimiento de RV de cabeza y muñeca.
|
||||
settings-osc-vrchat-enable = Habilitar
|
||||
settings-osc-vrchat-enable-description = Habilita el envio y recibo de datos.
|
||||
@@ -974,51 +967,15 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Saltar configuración
|
||||
onboarding-setup_warning-cancel = Continuar configuración
|
||||
|
||||
## Quiz
|
||||
|
||||
onboarding-quiz_continue = Continuar
|
||||
onboarding-quiz_back = Atrás
|
||||
onboarding-quiz-more_sets_modal-title = ¿Has conectado todos tus trackers?
|
||||
onboarding-quiz-more_sets_modal-desc = Si tienes sets de diferentes modelos, ¡los podemos conectar ahora!
|
||||
onboarding-quiz-more_sets_modal-confirm = He conectado todos mis trackers
|
||||
onboarding-quiz-more_sets_modal-cancel = Quiero conectar mas trackers
|
||||
onboarding-quiz-slimeset-title = ¿Que tipo de trackers estás conectando?
|
||||
onboarding-quiz-slimeset-description = Si tienes múltiples sets, se te preguntará de nuevo más adelante en el proceso
|
||||
onboarding-quiz-slimeset-official-sets = Trackers SlimeVR Oficiales
|
||||
onboarding-quiz-slimeset-thirdparty-sets = Trackers DIY o de terceros
|
||||
onboarding-quiz-slimeset-answer-regular = SlimeVR V1.0 y V1.2
|
||||
onboarding-quiz-slimeset-answer-butterfly = Mariposa
|
||||
onboarding-quiz-usage-title = ¿Para que usas tus trackers?
|
||||
onboarding-quiz-usage-description = Si planeas usar SlimeVR para múltiples propósitos, puedes cambiar los ajustes afectados más adelante.
|
||||
onboarding-quiz-usage-answer-VRC = Juegos VR (por ejemplo, VRChat)
|
||||
onboarding-quiz-usage-answer-mocap_vtubing = Mocap y VTubing
|
||||
onboarding-quiz-runtime-title = ¿Ejecutas los juegos por SteamVR o directamente del casco (independiente)?
|
||||
onboarding-quiz-runtime-answer-steamvr = SteamVR
|
||||
onboarding-quiz-runtime-answer-standalone = Independiente
|
||||
onboarding-quiz-mocap_preferences-title = Preferencias de Mocap
|
||||
onboarding-quiz-mocap_preferences-desc = Especifica cómo planeas usar SlimeVR para mocap o VTubing
|
||||
onboarding-quiz-mocap_preferences-playspace-title = ¿Cuál es tu espacio de juego?
|
||||
onboarding-quiz-mocap_preferences-playspace-desc = Si estás de pie, SlimeVR intentará trackear el movimiento al caminar en vez de anclarte en un lugar.
|
||||
onboarding-quiz-mocap_preferences-playspace-sitting = Sentado
|
||||
onboarding-quiz-mocap_preferences-playspace-standing = De pie
|
||||
onboarding-quiz-mocap_preferences-vrm_model-title = ¿Tienes un modelo VRM? (Opcional)
|
||||
onboarding-quiz-mocap_preferences-vrm_model-desc = Cargar un modelo VRM mejorará la calidad de trackeo y la compatibilidad con aplicaciones que usan VMC.
|
||||
onboarding-quiz-mocap_preferences-head_tracker-title = ¿Tienes un tracker o un casco VR en tu cabeza?
|
||||
onboarding-quiz-mocap_preferences-head_tracker-yes = Sí
|
||||
onboarding-quiz-mocap_preferences-head_tracker-no = No
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-title = ¿Donde se encuentra el tracker de cabeza?
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-forehead = Frente
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-face = Cara
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back-v2 = Volver a la introducción
|
||||
onboarding-wifi_creds-back = Volver a la introducción
|
||||
onboarding-wifi_creds-v2 = Trackers utilizando Wi-Fi
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
La mayoría de trackers (como los trackers oficiales de SlimeVR) utilizan Wi-Fi para conectar al servidor.
|
||||
Por favor utiliza las credenciales de la red Wi-Fi donde tu dispositivo esta actualmente conectado.
|
||||
|
||||
|
||||
¡Asegúrate de utilizar una conexión Wi-Fi 2.4Ghz para tus trackers!
|
||||
onboarding-wifi_creds-skip = Saltar ajustes de Wi-Fi
|
||||
onboarding-wifi_creds-submit = ¡Enviar!
|
||||
@@ -1043,27 +1000,22 @@ onboarding-reset_tutorial-skip = Saltar paso
|
||||
# Cares about multiline
|
||||
onboarding-reset_tutorial-0 =
|
||||
Toca { $taps } veces el tracker resaltado para activar el reinicio horizontal.
|
||||
|
||||
|
||||
Esto va a hacer que tus sensores miren para la misma dirección que tu HMD.
|
||||
# Cares about multiline
|
||||
onboarding-reset_tutorial-1 =
|
||||
Toca { $taps } veces el tracker resaltado para activar el reinicio completo.
|
||||
|
||||
|
||||
Se requiere que estés de pie (pose en i). Esto tiene una demora de 3 segundos (configurable) antes de que realmente suceda.
|
||||
Esto reinicia completamente la posición y rotación de todos tus trackers. Debería de arreglar la mayoría de los problemas.
|
||||
# Cares about multiline
|
||||
onboarding-reset_tutorial-2 =
|
||||
Toca { $taps } veces el tracker resaltado para activar el reinicio de montura.
|
||||
|
||||
|
||||
El reinicio de montura ayuda en como tus sensores están puestos en tu cuerpo, ya que si los movistes o cambiaste para donde están orientados bastante, esto debería de ayudar.
|
||||
|
||||
|
||||
Requiere que estas en una pose como que estás esquiando, como se muestra en el tutorial de montura automática y tenes un retraso de 3 segundos (configurable) antes de que actualmente suceda.
|
||||
|
||||
## Install info
|
||||
|
||||
install-info_udev-rules_modal_button = Cerrar
|
||||
install-info_udev-rules_modal-dont-show-again_checkbox = No mostrar de nuevo
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Bienvenido a SlimeVR
|
||||
@@ -1407,7 +1359,6 @@ onboarding-user_height-description = Necesitamos tu altura para calcular tus pro
|
||||
onboarding-user_height-need_head_tracker = Un casco y controles con rastreo posicional son requeridos para realizar la calibración.
|
||||
onboarding-user_height-calculate = Calcular mi altura automáticamente
|
||||
onboarding-user_height-next_step = Continuar y guardar
|
||||
onboarding-user_height-prev_step = Atrás
|
||||
onboarding-user_height-manual-proportions = Proporciones Manuales
|
||||
onboarding-user_height-calibration-title = Progreso de Calibración
|
||||
onboarding-user_height-calibration-RECORDING_FLOOR = Toca el suelo con la punta de tu control
|
||||
@@ -1461,7 +1412,6 @@ onboarding-stay_aligned-previous_step = Atrás
|
||||
onboarding-stay_aligned-next_step = Siguiente
|
||||
onboarding-stay_aligned-restart = Reiniciar
|
||||
onboarding-stay_aligned-done = Hecho
|
||||
onboarding-stay_aligned-manual_mounting-done = Hecho
|
||||
|
||||
## Home
|
||||
|
||||
@@ -1512,9 +1462,6 @@ firmware_tool-select_source-firmware = Fuente del Firmware
|
||||
firmware_tool-select_source-version = Versión del Firmware
|
||||
firmware_tool-select_source-official = Oficial
|
||||
firmware_tool-select_source-dev = Desarrollo
|
||||
firmware_tool-select_source-not_selected = Ninguna fuente seleccionada
|
||||
firmware_tool-select_source-no_boards = No hay placas disponibles para esta fuente
|
||||
firmware_tool-select_source-no_versions = No hay versiones disponibles para esta fuente
|
||||
firmware_tool-board_defaults = Configura tu placa
|
||||
firmware_tool-board_defaults-description = Establece los pines o ajustes relativos a tu hardware
|
||||
firmware_tool-board_defaults-add = Añadir
|
||||
@@ -1541,7 +1488,7 @@ firmware_tool-flashbtn_step-board_SLIMEVR-r12-v2 = Enciende el tracker mientras
|
||||
firmware_tool-flashbtn_step-board_SLIMEVR-r14-v2 = Enciende el tracker mientras pulsas el botón FLASH en la parte superior de la placa. El LED del tracker deberia hacer un parpadeo breve.
|
||||
firmware_tool-flashbtn_step-board_OTHER =
|
||||
Antes de flashear, probablemente tendrá que poner el sensor en modo bootloader.
|
||||
La mayoría de las veces, esto significa presionar el botón de boot en la placa antes de que comience el proceso de flasheo. Si el proceso de flasheo se agota al comienzo, probablemente significa que el sensor no estaba en modo bootloader.
|
||||
La mayoría de las veces, esto significa presionar el botón de boot en la placa antes de que comience el proceso de flasheo. Si el proceso de flasheo se agota al comienzo, probablemente significa que el sensor no estaba en modo bootloader.
|
||||
Por favor, consulte las instrucciones de flasheo de su placa para saber cómo activar el modo bootloader.
|
||||
firmware_tool-flash_method_ota-title = Flashear por Wi-Fi
|
||||
firmware_tool-flash_method_ota-devices = Dispositivos OTA detectados:
|
||||
@@ -1558,7 +1505,6 @@ firmware_tool-flashing_step-description = Sus trackers se están flasheando, por
|
||||
firmware_tool-flashing_step-warning-v2 = No desconectes o apagues el tracker durante el proceso de subida a menos que se te indique, puede causar que tu placa quede inutilizable.
|
||||
firmware_tool-flashing_step-flash_more = Flashear más sensores
|
||||
firmware_tool-flashing_step-exit = Salir
|
||||
firmware_tool-flashing_step-onboarding_continue = Continuar
|
||||
|
||||
## firmware tool build status
|
||||
|
||||
@@ -1614,7 +1560,7 @@ tray_or_exit_modal-title = ¿Que debería hacer el botón de cerrar?
|
||||
# Multiline text
|
||||
tray_or_exit_modal-description =
|
||||
Esto te deja escoger si quieres cerrar el servidor o minimizarlo a la bandeja cuando se presiona el botón de cerrar.
|
||||
|
||||
|
||||
¡Puedes cambiar esto luego en los ajustes de la interfaz!
|
||||
tray_or_exit_modal-radio-exit = Salir al cerrar
|
||||
tray_or_exit_modal-radio-tray = Minimizar a la bandeja del sistema
|
||||
@@ -1675,7 +1621,7 @@ vrc_config-avatar_measurement_type-ARM_SPAN = Longitud del brazo
|
||||
error_collection_modal-title = ¿Podemos recopilar errores?
|
||||
error_collection_modal-description_v2 =
|
||||
{ settings-interface-behavior-error_tracking-description_v2 }
|
||||
|
||||
|
||||
Tu puedes cambiar esta configuración más tarde en la sección de comportamiento de la pagina de configuración.
|
||||
error_collection_modal-confirm = Acepto
|
||||
error_collection_modal-cancel = No quiero
|
||||
@@ -1700,9 +1646,6 @@ tracking_checklist-FULL_RESET-desc = Algunos trackers necesitan realizar un rein
|
||||
tracking_checklist-STEAMVR_DISCONNECTED = SteamVR no se está ejecutando
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-desc = SteamVR no se esta ejecutando. ¿Lo estas usando para VR?
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-open = Abrir SteamVR
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED = Trackers de mano activados
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-desc = Has activado los trackers de mano virtuales de SteamVR. Esto causará que los botones no funcionarán en SteamVR ni en juegos.
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-go = Desactívalos
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION = Calibra tus trackers
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION-desc = No realizaste una calibración para los trackers. Por favor deja reposar tus trackers (resaltados en amarillo) en una superficie estable por unos segundos.
|
||||
tracking_checklist-TRACKER_ERROR = Trackers con Errores
|
||||
|
||||
@@ -19,7 +19,7 @@ import { ArrowDownIcon, ArrowUpIcon } from './icon/ArrowIcons';
|
||||
import { a11yClick } from '@/utils/a11y';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
export type DropdownItem = {
|
||||
type DropdownItem = {
|
||||
value: string;
|
||||
label: ReactNode;
|
||||
};
|
||||
|
||||
@@ -93,10 +93,9 @@ export const FileInputContentFile = ({
|
||||
</div>
|
||||
<span className="flex-grow" />
|
||||
<a
|
||||
href=""
|
||||
href="#"
|
||||
className="h-12 w-12 hover:bg-accent-background-20 cursor-pointer"
|
||||
onClick={(ev) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
onClearPicker();
|
||||
}}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
export function VMCIcon() {
|
||||
export function VMCIcon({ width }: { width?: number }) {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-38 0 409 155">
|
||||
<svg
|
||||
id="svg5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
x={0}
|
||||
y={0}
|
||||
width={width ?? 'fit-content'}
|
||||
viewBox="-38 0 409 155"
|
||||
xmlSpace="preserve"
|
||||
>
|
||||
<style>
|
||||
{
|
||||
'.st1,.st3{stroke:#000;stroke-width:13}.st3{display:inline;fill:none;stroke-width:12.9402;stroke-miterlimit:11.3386}'
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
export function VRCIcon() {
|
||||
export function VRCIcon({ width }: { width?: number }) {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="100 100 824 824">
|
||||
<svg
|
||||
viewBox="100 100 824 824"
|
||||
width={width ?? 'fit-content'}
|
||||
className="fill-background-10"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path d="M246.1 418.9h531.8c8.4 0 16 3.4 21.5 8.9s8.9 13.1 8.9 21.5v125.4c0 8.4-3.4 16-8.9 21.5-4.8 4.8-11.1 8-18.1 8.7v46.3c0 10.9-8.8 19-19.5 15.1-3.8-1.4-7.9-4.6-11.9-9.9L709.6 605H246.1c-8.4 0-16-3.4-21.5-8.9s-8.9-13.1-8.9-21.5V449.3c0-8.4 3.4-16 8.9-21.5s13.1-8.9 21.5-8.9zm523.8 174.8h8c5.2 0 10-2.1 13.5-5.6 3.5-3.5 5.6-8.2 5.6-13.5V449.3c0-5.2-2.1-10-5.6-13.5-3.5-3.5-8.2-5.6-13.5-5.6H246.1c-5.2 0-10 2.1-13.5 5.6-3.5 3.5-5.6 8.2-5.6 13.5v125.4c0 5.2 2.1 10 5.6 13.5 3.5 3.5 8.2 5.6 13.5 5.6h469.4c15.8 19.8 31.1 40 46.9 59.8 2.5 3.3 7.7 3.9 7.6-2.5v-57.4h-.1zm-132.3-67.1h23.9l-12-42.2-11.9 42.2zm110.8-74.2H460.6c-10.8 0-19.6 8.8-19.6 19.6v79.7c0 10.8 8.8 19.6 19.6 19.6h287.8c10.8 0 19.6-8.8 19.6-19.6V472c0-10.7-8.8-19.6-19.6-19.6zm-270.3 91.4c2.5 2.6 6.2 3.9 10.9 3.9 3.1 0 5.6-.5 7.4-1.5 1.8-1 3.2-2.2 4.1-3.7.9-1.5 1.5-3.1 1.9-4.7.3-1.7.5-3.3.6-4.7.2-2.1 1.1-3.6 2.8-4.4 1.7-.8 3.7-1.2 6.1-1.2 3.1 0 5.4.6 6.9 1.8 1.5 1.2 2.2 3.5 2.2 7 0 4.1-.8 7.9-2.4 11.3-1.6 3.4-3.9 6.3-6.8 8.6s-6.4 4.1-10.5 5.4c-4 1.3-8.4 1.9-13.2 1.9-4.3 0-8.4-.6-12.2-1.7-3.9-1.1-7.2-3-10.1-5.4-2.9-2.5-5.2-5.7-6.8-9.7-1.7-4-2.5-8.9-2.5-14.7v-38.4c0-5.8.8-10.7 2.5-14.7s4-7.2 6.9-9.7c2.9-2.5 6.3-4.3 10.1-5.4 3.9-1.1 7.9-1.7 12.2-1.7 4.8 0 9.2.6 13.2 1.9 4 1.2 7.5 3 10.4 5.2 2.9 2.2 5.1 5 6.7 8.3 1.6 3.3 2.4 6.9 2.4 10.8 0 3.6-.7 5.9-2.2 7.1-1.5 1.1-3.7 1.7-6.7 1.7-2.6 0-4.7-.4-6.3-1.2-1.7-.8-2.5-2.3-2.6-4.4-.1-1.1-.3-2.4-.6-3.9s-.9-3-1.9-4.5c-1-1.5-2.4-2.7-4.2-3.7-1.8-1-4.4-1.5-7.7-1.5-4.7 0-8.3 1.3-10.7 3.9-2.5 2.6-3.7 6.6-3.7 12v38.4c0 5.1 1.3 9.1 3.8 11.6zm122.7 13.1c0 1.8-.9 3.2-2.8 4.2s-3.9 1.4-6.1 1.4c-2.3 0-4.4-.5-6.2-1.4-1.8-1-2.8-2.4-2.8-4.2v-39.5h-31v39.5c0 1.8-.9 3.2-2.8 4.2s-3.9 1.4-6.1 1.4c-2.3 0-4.4-.5-6.2-1.4-1.8-1-2.8-2.4-2.8-4.2v-89.4c0-1.9.9-3.3 2.8-4.2 1.8-.9 3.9-1.3 6.2-1.3 2.2 0 4.2.4 6.1 1.3 1.9.9 2.8 2.3 2.8 4.2v35.9h31v-35.9c0-1.9.9-3.3 2.8-4.2 1.8-.9 3.9-1.3 6.2-1.3 2.2 0 4.2.4 6.1 1.3 1.9.9 2.8 2.3 2.8 4.2v89.4zm86 1.2c-.7.9-1.7 1.7-2.8 2.3-1.1.7-2.3 1.2-3.6 1.6-1.3.4-2.6.6-3.8.6-1.6 0-2.9-.3-3.9-.8-1.1-.6-1.8-1.5-2.1-2.8l-5.2-18.3h-31.5l-5.2 18.3c-.4 1.3-1.1 2.2-2.1 2.8-1.1.5-2.4.8-3.9.8-1.2 0-2.5-.2-3.8-.6-1.3-.4-2.5-.9-3.6-1.5s-2-1.4-2.8-2.3c-.7-.9-1.1-1.9-1.1-3 0-.2.1-.6.3-1.4l26.6-86.5c.6-2.1 2.1-3.6 4.3-4.6 2.2-1 4.6-1.4 7.2-1.4 2.7 0 5.1.5 7.3 1.4 2.2 1 3.6 2.5 4.3 4.6l26.6 86.5c.2.7.3 1.2.3 1.4-.4 1-.7 2-1.5 2.9zm65-82.5c-1 1.7-2.4 2.5-4.2 2.5h-20.1v78.8c0 1.8-.9 3.2-2.8 4.2s-3.9 1.4-6.1 1.4c-2.3 0-4.4-.5-6.2-1.4-1.8-1-2.8-2.4-2.8-4.2v-78.8h-20.2c-1.8 0-3.2-.8-4.2-2.4-1-1.6-1.4-3.5-1.4-5.7 0-1.9.5-3.7 1.4-5.4.9-1.7 2.3-2.5 4.3-2.5h58.2c1.9 0 3.3.8 4.3 2.5.9 1.7 1.4 3.5 1.4 5.4-.2 2.1-.7 3.9-1.6 5.6zm-495.2-4.8 26.6 86.5c.7 2.1 2.2 3.6 4.3 4.6 2.2 1 4.6 1.4 7.2 1.4 2.7 0 5.1-.5 7.3-1.4 2.2-1 3.6-2.5 4.3-4.6l26.4-86.5c.2-.7.3-1.2.3-1.4 0-1.1-.4-2.1-1.1-3-.7-.9-1.7-1.7-2.8-2.3-1.1-.7-2.3-1.2-3.6-1.6-1.3-.4-2.6-.5-3.8-.5-1.6 0-2.9.3-3.9.8-1.1.5-1.8 1.5-2.1 2.8l-20.9 74.6-21-74.6c-.4-1.3-1.1-2.2-2.1-2.8-1.1-.6-2.4-.8-3.9-.8-1.2 0-2.5.2-3.8.5-1.3.4-2.5.9-3.6 1.5s-2 1.4-2.8 2.3c-.7.9-1.1 1.9-1.1 3-.2.3-.1.7.1 1.5zm86.9-3.3c0-1.5.5-2.8 1.6-3.9s2.5-1.7 4.2-1.7h27.2c4.5 0 8.7.5 12.7 1.4 3.9 1 7.4 2.5 10.4 4.7s5.3 5.1 7 8.8c1.7 3.7 2.5 8.3 2.5 13.8 0 7.9-1.7 14.1-5.2 18.5-3.4 4.4-7.7 7.5-12.9 9l18 33.4c.3.4.5.8.5 1.2.1.4.1.8.1 1 0 1.1-.3 2.2-1 3.4-.7 1.1-1.6 2.2-2.6 3-1.1.9-2.2 1.6-3.6 2.1-1.3.6-2.6.8-3.9.8-1.3 0-2.5-.4-3.5-1.1-1.1-.7-1.9-1.8-2.7-3.2l-19.5-38h-11.6v35.9c0 1.8-.9 3.2-2.8 4.2-1.8 1-3.9 1.4-6.2 1.4-2.2 0-4.2-.5-6.1-1.4-1.9-1-2.8-2.4-2.8-4.2v-89.1h.2zm17.9 10.2V507h15.1c4.5 0 8.1-1.1 10.7-3.2 2.7-2.2 4-5.9 4-11.3s-1.3-9.2-4-11.4c-2.7-2.2-6.2-3.3-10.7-3.3h-15.1v-.1z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
@@ -100,11 +100,7 @@ export function TrackersAssignPage() {
|
||||
tapDetectionSettings.mountingResetDelay,
|
||||
tapDetectionSettings.mountingResetEnabled,
|
||||
tapDetectionSettings.mountingResetTaps,
|
||||
true,
|
||||
null,
|
||||
tapDetectionSettings.yawResetTracker,
|
||||
tapDetectionSettings.fullResetTracker,
|
||||
tapDetectionSettings.mountingResetTracker
|
||||
true
|
||||
);
|
||||
|
||||
sendRPCPacket(
|
||||
|
||||
@@ -2,14 +2,11 @@ import { ReactNode } from 'react';
|
||||
import { ConfigContextC, loadConfig, useConfigProvider } from '@/hooks/config';
|
||||
import { getSentryOrCompute } from '@/utils/sentry';
|
||||
|
||||
const [config, isSteam] = await Promise.all([
|
||||
loadConfig(),
|
||||
window.electronAPI.isSteam(),
|
||||
]);
|
||||
const config = await loadConfig();
|
||||
|
||||
if (config?.errorTracking !== undefined) {
|
||||
// load sentry ASAP to catch early errors
|
||||
getSentryOrCompute(config.errorTracking ?? false, config.uuid, isSteam);
|
||||
getSentryOrCompute(config.errorTracking ?? false, config.uuid);
|
||||
}
|
||||
|
||||
export function ConfigContextProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
@@ -15,8 +15,6 @@ import {
|
||||
SteamVRTrackersSettingT,
|
||||
TapDetectionSettingsT,
|
||||
HIDSettingsT,
|
||||
VelocitySettingsT,
|
||||
BodyPart,
|
||||
} from 'solarxr-protocol';
|
||||
import { useConfig } from '@/hooks/config';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
@@ -48,8 +46,6 @@ import {
|
||||
import { atom, useAtomValue, useSetAtom } from 'jotai';
|
||||
import { isEqual } from '@react-hookz/deep-equal';
|
||||
import { selectAtom } from 'jotai/utils';
|
||||
import { Dropdown } from '@/components/commons/Dropdown';
|
||||
import { ASSIGNMENT_MODES } from '@/components/onboarding/BodyAssignment';
|
||||
|
||||
export type SettingsForm = {
|
||||
trackers: {
|
||||
@@ -103,9 +99,6 @@ export type SettingsForm = {
|
||||
fullResetTaps: number;
|
||||
mountingResetTaps: number;
|
||||
numberTrackersOverThreshold: number;
|
||||
yawResetTracker: string;
|
||||
mountingResetTracker: string;
|
||||
fullResetTracker: string;
|
||||
};
|
||||
legTweaks: {
|
||||
correctionStrength: number;
|
||||
@@ -115,9 +108,6 @@ export type SettingsForm = {
|
||||
hidSettings: {
|
||||
trackersOverHID: boolean;
|
||||
};
|
||||
velocitySettings: {
|
||||
sendDerivedVelocity: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
const defaultValues: SettingsForm = {
|
||||
@@ -169,15 +159,11 @@ const defaultValues: SettingsForm = {
|
||||
fullResetTaps: 3,
|
||||
mountingResetTaps: 3,
|
||||
numberTrackersOverThreshold: 1,
|
||||
yawResetTracker: String(BodyPart.CHEST),
|
||||
mountingResetTracker: String(BodyPart.RIGHT_UPPER_LEG),
|
||||
fullResetTracker: String(BodyPart.LEFT_UPPER_LEG),
|
||||
},
|
||||
legTweaks: { correctionStrength: 0.3 },
|
||||
resetsSettings: defaultResetSettings,
|
||||
stayAligned: defaultStayAlignedSettings,
|
||||
hidSettings: { trackersOverHID: false },
|
||||
velocitySettings: { sendDerivedVelocity: false },
|
||||
};
|
||||
|
||||
const settingsAtom = atom(new SettingsResponseT());
|
||||
@@ -194,13 +180,6 @@ export function GeneralSettings() {
|
||||
const { config } = useConfig();
|
||||
const { currentLocales } = useLocaleConfig();
|
||||
|
||||
const bodyParts: { value: string; label: string }[] = Object.values(BodyPart)
|
||||
.filter((v): v is BodyPart => typeof v === 'number')
|
||||
.filter((v) => ASSIGNMENT_MODES['full-body'].includes(v as BodyPart))
|
||||
.map((value) => ({
|
||||
value: String(value),
|
||||
label: l10n.getString(`body_part-${BodyPart[value]}`),
|
||||
}));
|
||||
const blockHandsWarning = useRef(false);
|
||||
// If not null, warning will be shown, and showHandsWarning will
|
||||
// hold which hands should be toggled ([leftHand, rightHand])
|
||||
@@ -326,13 +305,6 @@ export function GeneralSettings() {
|
||||
tapDetection.yawResetDelay = values.tapDetection.yawResetDelay;
|
||||
tapDetection.yawResetEnabled = values.tapDetection.yawResetEnabled;
|
||||
tapDetection.yawResetTaps = values.tapDetection.yawResetTaps;
|
||||
tapDetection.yawResetTracker = Number(values.tapDetection.yawResetTracker);
|
||||
tapDetection.mountingResetTracker = Number(
|
||||
values.tapDetection.mountingResetTracker
|
||||
);
|
||||
tapDetection.fullResetTracker = Number(
|
||||
values.tapDetection.fullResetTracker
|
||||
);
|
||||
tapDetection.mountingResetEnabled =
|
||||
values.tapDetection.mountingResetEnabled;
|
||||
tapDetection.mountingResetDelay = values.tapDetection.mountingResetDelay;
|
||||
@@ -353,11 +325,6 @@ export function GeneralSettings() {
|
||||
hidSettings.trackersOverHid = values.hidSettings.trackersOverHID;
|
||||
settingsReq.hidSettings = hidSettings;
|
||||
|
||||
const velocitySettings = new VelocitySettingsT();
|
||||
velocitySettings.sendDerivedVelocity =
|
||||
values.velocitySettings.sendDerivedVelocity;
|
||||
settingsReq.velocitySettings = velocitySettings;
|
||||
|
||||
if (values.resetsSettings) {
|
||||
settingsReq.resetsSettings = loadResetSettings(values.resetsSettings);
|
||||
}
|
||||
@@ -449,18 +416,6 @@ export function GeneralSettings() {
|
||||
mountingResetTaps:
|
||||
settings.tapDetectionSettings.mountingResetTaps ||
|
||||
defaultValues.tapDetection.mountingResetTaps,
|
||||
yawResetTracker: String(
|
||||
settings.tapDetectionSettings.yawResetTracker ||
|
||||
defaultValues.tapDetection.yawResetTracker
|
||||
),
|
||||
fullResetTracker: String(
|
||||
settings.tapDetectionSettings.fullResetTracker ||
|
||||
defaultValues.tapDetection.fullResetTracker
|
||||
),
|
||||
mountingResetTracker: String(
|
||||
settings.tapDetectionSettings.mountingResetTracker ||
|
||||
defaultValues.tapDetection.mountingResetTracker
|
||||
),
|
||||
numberTrackersOverThreshold:
|
||||
settings.tapDetectionSettings.numberTrackersOverThreshold ||
|
||||
defaultValues.tapDetection.numberTrackersOverThreshold,
|
||||
@@ -491,12 +446,6 @@ export function GeneralSettings() {
|
||||
};
|
||||
}
|
||||
|
||||
if (settings.velocitySettings) {
|
||||
formData.velocitySettings = {
|
||||
sendDerivedVelocity: settings.velocitySettings.sendDerivedVelocity,
|
||||
};
|
||||
}
|
||||
|
||||
reset({ ...getValues(), ...formData });
|
||||
}, [settings]);
|
||||
|
||||
@@ -1067,32 +1016,6 @@ export function GeneralSettings() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col pt-2 pb-1">
|
||||
<Typography variant="section-title">
|
||||
{l10n.getString(
|
||||
'settings-general-fk_settings-velocity_settings'
|
||||
)}
|
||||
</Typography>
|
||||
<div className="pt-2">
|
||||
<Typography>
|
||||
{l10n.getString(
|
||||
'settings-general-fk_settings-velocity_settings-description'
|
||||
)}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid sm:grid-cols-1 pb-3">
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="velocitySettings.sendDerivedVelocity"
|
||||
label={l10n.getString(
|
||||
'settings-general-fk_settings-velocity_settings-send_derived_velocity'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{config?.debug && (
|
||||
<>
|
||||
<div className="flex flex-col pt-2 pb-3">
|
||||
@@ -1285,80 +1208,34 @@ export function GeneralSettings() {
|
||||
{l10n.getString('settings-general-gesture_control-description')}
|
||||
</Typography>
|
||||
</div>
|
||||
<div>
|
||||
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="tapDetection.yawResetEnabled"
|
||||
label={l10n.getString(
|
||||
'settings-general-gesture_control-yawResetEnabled'
|
||||
)}
|
||||
/>
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="tapDetection.fullResetEnabled"
|
||||
label={l10n.getString(
|
||||
'settings-general-gesture_control-fullResetEnabled'
|
||||
)}
|
||||
/>
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="tapDetection.mountingResetEnabled"
|
||||
label={l10n.getString(
|
||||
'settings-general-gesture_control-mountingResetEnabled'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
||||
<div>
|
||||
<Typography variant="section-title">
|
||||
{l10n.getString(
|
||||
'settings-general-gesture_control-yawResetTracker'
|
||||
)}
|
||||
</Typography>
|
||||
<Dropdown
|
||||
display="block"
|
||||
control={control}
|
||||
placeholder={''}
|
||||
name="tapDetection.yawResetTracker"
|
||||
items={bodyParts}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Typography variant="section-title">
|
||||
{l10n.getString(
|
||||
'settings-general-gesture_control-mountingResetTracker'
|
||||
)}
|
||||
</Typography>
|
||||
<Dropdown
|
||||
display="block"
|
||||
control={control}
|
||||
placeholder={''}
|
||||
name="tapDetection.mountingResetTracker"
|
||||
items={bodyParts}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Typography variant="section-title">
|
||||
{l10n.getString(
|
||||
'settings-general-gesture_control-fullResetTracker'
|
||||
)}
|
||||
</Typography>
|
||||
<Dropdown
|
||||
display="block"
|
||||
control={control}
|
||||
placeholder={''}
|
||||
name="tapDetection.fullResetTracker"
|
||||
items={bodyParts}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="tapDetection.yawResetEnabled"
|
||||
label={l10n.getString(
|
||||
'settings-general-gesture_control-yawResetEnabled'
|
||||
)}
|
||||
/>
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="tapDetection.fullResetEnabled"
|
||||
label={l10n.getString(
|
||||
'settings-general-gesture_control-fullResetEnabled'
|
||||
)}
|
||||
/>
|
||||
<CheckBox
|
||||
variant="toggle"
|
||||
outlined
|
||||
control={control}
|
||||
name="tapDetection.mountingResetEnabled"
|
||||
label={l10n.getString(
|
||||
'settings-general-gesture_control-mountingResetEnabled'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
||||
<NumberSelector
|
||||
|
||||
@@ -102,9 +102,9 @@ export function OSCRouterSettings() {
|
||||
formData.router.oscSettings.address =
|
||||
settings.oscRouter.oscSettings.address.toString();
|
||||
}
|
||||
|
||||
reset(formData);
|
||||
}
|
||||
|
||||
reset(formData);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
SettingsResponseT,
|
||||
OSCSettingsT,
|
||||
VMCOSCSettingsT,
|
||||
VRMSettingsT,
|
||||
} from 'solarxr-protocol';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
import { CheckBox } from '@/components/commons/Checkbox';
|
||||
@@ -54,6 +53,7 @@ export function VMCFileUpload() {
|
||||
const { sendRPCPacket, useRPCPacket } = useWebsocketAPI();
|
||||
const { l10n } = useLocalization();
|
||||
const [modelName, setModelName] = useState<string | null>(null);
|
||||
const [settings, setSettings] = useState<SettingsResponseT>();
|
||||
|
||||
const { control, watch } = useForm<{
|
||||
vrmJson?: FileList;
|
||||
@@ -66,21 +66,27 @@ export function VMCFileUpload() {
|
||||
const vrmJson = watch('vrmJson');
|
||||
|
||||
const updateVRMJson = async () => {
|
||||
if (!settings?.vmcOsc) return;
|
||||
|
||||
const req = new ChangeSettingsRequestT();
|
||||
const vrm = new VRMSettingsT();
|
||||
const vmcOsc = new VMCOSCSettingsT();
|
||||
vmcOsc.oscSettings = Object.assign(
|
||||
new OSCSettingsT(),
|
||||
settings.vmcOsc.oscSettings
|
||||
);
|
||||
if (vrmJson !== undefined) {
|
||||
if (vrmJson.length > 0) {
|
||||
const file = await parseVRMFile(vrmJson[0]);
|
||||
if (file) {
|
||||
vrm.vrmJson = file.json;
|
||||
vmcOsc.vrmJson = file.json;
|
||||
setModelName(file.name);
|
||||
}
|
||||
} else {
|
||||
vrm.vrmJson = '';
|
||||
vmcOsc.vrmJson = '';
|
||||
setModelName(null);
|
||||
}
|
||||
}
|
||||
req.vrm = vrm;
|
||||
req.vmcOsc = vmcOsc;
|
||||
sendRPCPacket(RpcMessage.ChangeSettingsRequest, req);
|
||||
};
|
||||
|
||||
@@ -93,7 +99,8 @@ export function VMCFileUpload() {
|
||||
}, []);
|
||||
|
||||
useRPCPacket(RpcMessage.SettingsResponse, (settings: SettingsResponseT) => {
|
||||
const vrmJson = settings.vrm?.vrmJson?.toString();
|
||||
setSettings(settings);
|
||||
const vrmJson = settings.vmcOsc?.vrmJson?.toString();
|
||||
if (vrmJson) {
|
||||
let data: any;
|
||||
try {
|
||||
@@ -189,9 +196,9 @@ export function VMCSettings() {
|
||||
|
||||
formData.vmc.anchorHip = settings.vmcOsc.anchorHip;
|
||||
formData.vmc.mirrorTracking = settings.vmcOsc.mirrorTracking;
|
||||
|
||||
reset(formData);
|
||||
}
|
||||
|
||||
reset(formData);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -142,9 +142,9 @@ export function VRCOSCSettings() {
|
||||
formData.vrchat.trackers = settings.vrcOsc.trackers;
|
||||
|
||||
formData.vrchat.oscqueryEnabled = settings.vrcOsc.oscqueryEnabled;
|
||||
|
||||
reset(formData);
|
||||
}
|
||||
|
||||
reset(formData);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { FieldPath, useForm } from 'react-hook-form';
|
||||
import { useConfig } from '@/hooks/config';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
import { CheckBox } from '@/components/commons/Checkbox';
|
||||
import { useLocalization } from '@fluent/react';
|
||||
|
||||
@@ -27,10 +28,7 @@ export const defaultValues: DeveloperModeWidgetForm = {
|
||||
export function DeveloperModeWidget() {
|
||||
const { l10n } = useLocalization();
|
||||
const { config, setConfig } = useConfig();
|
||||
|
||||
const onSubmit = (formData: DeveloperModeWidgetForm) => {
|
||||
setConfig({ devSettings: formData });
|
||||
};
|
||||
const { reconnect } = useWebsocketAPI();
|
||||
|
||||
const { reset, control, handleSubmit, watch } =
|
||||
useForm<DeveloperModeWidgetForm>({
|
||||
@@ -46,6 +44,13 @@ export function DeveloperModeWidget() {
|
||||
return () => subscription.unsubscribe();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (formData: DeveloperModeWidgetForm) => {
|
||||
const needReconnect =
|
||||
config?.devSettings?.fastDataFeed !== formData.fastDataFeed;
|
||||
await setConfig({ devSettings: formData });
|
||||
if (needReconnect) reconnect();
|
||||
};
|
||||
|
||||
const makeToggle = ([name, label]: string[], index: number) => (
|
||||
<CheckBox
|
||||
key={index}
|
||||
|
||||
@@ -16,8 +16,6 @@ import { getSentryOrCompute, updateSentryContext } from '@/utils/sentry';
|
||||
import { fetchCurrentFirmwareRelease, FirmwareRelease } from './firmware-update';
|
||||
import { DEFAULT_LOCALE, LangContext } from '@/i18n/config';
|
||||
|
||||
const isSteam = await window.electronAPI.isSteam();
|
||||
|
||||
export interface AppContext {
|
||||
currentFirmwareRelease: FirmwareRelease | null;
|
||||
}
|
||||
@@ -42,7 +40,7 @@ export function useProvideAppContext(): AppContext {
|
||||
startDataFeed.dataFeeds = [dataFeedConfig, bonesDataFeedConfig];
|
||||
sendDataFeedPacket(DataFeedMessage.StartDataFeed, startDataFeed);
|
||||
}
|
||||
}, [isConnected, config?.debug, config?.devSettings?.fastDataFeed]);
|
||||
}, [isConnected]);
|
||||
|
||||
useDataFeedPacket(DataFeedMessage.DataFeedUpdate, (packet: DataFeedUpdateT) => {
|
||||
if (packet.index === 0) {
|
||||
@@ -81,7 +79,7 @@ export function useProvideAppContext(): AppContext {
|
||||
if (config.errorTracking !== undefined) {
|
||||
// Alows for sentry to refresh if user change the setting once the gui
|
||||
// is initialized
|
||||
getSentryOrCompute(config.errorTracking ?? false, config.uuid, isSteam);
|
||||
getSentryOrCompute(config.errorTracking ?? false, config.uuid);
|
||||
}
|
||||
}, [config]);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ export function useDataFeedConfig() {
|
||||
const { config } = useConfig();
|
||||
|
||||
const fastDataFeed = config?.debug && config?.devSettings?.fastDataFeed;
|
||||
const feedMaxTps = fastDataFeed ? 90 : 10;
|
||||
const feedMaxTps = fastDataFeed ? 40 : 10;
|
||||
|
||||
const trackerData = new TrackerDataMaskT();
|
||||
trackerData.position = true;
|
||||
@@ -39,13 +39,8 @@ export function useDataFeedConfig() {
|
||||
}
|
||||
|
||||
export function useBonesDataFeedConfig() {
|
||||
const { config } = useConfig();
|
||||
|
||||
const fastDataFeed = config?.debug && config?.devSettings?.fastDataFeed;
|
||||
const feedMaxTps = fastDataFeed ? 90 : 40;
|
||||
|
||||
const dataFeedConfig = new DataFeedConfigT();
|
||||
dataFeedConfig.boneMask = true;
|
||||
dataFeedConfig.minimumTimeSinceLast = 1000 / feedMaxTps;
|
||||
dataFeedConfig.minimumTimeSinceLast = 1000 / 40;
|
||||
return dataFeedConfig;
|
||||
}
|
||||
@@ -25,7 +25,6 @@ export function useDiscordPresence() {
|
||||
activity: l10n.getString('settings-general-interface-discord_presence-message', {
|
||||
amount: imuTrackersCount,
|
||||
}),
|
||||
iconText: (__VERSION_TAG__ || __COMMIT_HASH__) + (__GIT_CLEAN__ ? '' : '-dirty'),
|
||||
});
|
||||
}, [config?.discordPresence, imuTrackersCount]);
|
||||
}
|
||||
@@ -32,8 +32,6 @@ export const trackingchecklistIdtoLabel: Record<TrackingChecklistStepId, string>
|
||||
'tracking_checklist-STAY_ALIGNED_CONFIGURED',
|
||||
[TrackingChecklistStepId.STEAMVR_HANDS_ENABLED]:
|
||||
'tracking_checklist-STEAMVR_HANDS_ENABLED',
|
||||
[TrackingChecklistStepId.STANDABLE_INSTALLED]:
|
||||
'tracking_checklist-STANDABLE_INSTALLED',
|
||||
};
|
||||
|
||||
export type TrackingChecklistStepStatus =
|
||||
|
||||
+4
-10
@@ -9,13 +9,7 @@ import {
|
||||
} from 'react-router-dom';
|
||||
import { DeviceDataT } from 'solarxr-protocol';
|
||||
|
||||
export function getSentryOrCompute(enabled = false, uuid: string, isSteam: boolean) {
|
||||
// to be considered prod it needs to be a proper version tag, non-dirty
|
||||
const isProd = import.meta.env.PROD && __GIT_CLEAN__ && __VERSION_TAG__;
|
||||
|
||||
// We disable sentry for non prod environments
|
||||
if (!isProd) enabled = false;
|
||||
|
||||
export function getSentryOrCompute(enabled = false, uuid: string) {
|
||||
Sentry.setUser({ id: uuid });
|
||||
|
||||
// if sentry is already initialized - SKIP
|
||||
@@ -50,10 +44,10 @@ export function getSentryOrCompute(enabled = false, uuid: string, isSteam: boole
|
||||
}),
|
||||
],
|
||||
beforeSend: (ev) => (newClient?.getOptions().enabled ? ev : null),
|
||||
environment: isSteam ? 'steam' : 'production',
|
||||
environment: import.meta.env.MODE,
|
||||
release: (__VERSION_TAG__ || __COMMIT_HASH__) + (__GIT_CLEAN__ ? '' : '-dirty'),
|
||||
// Tracing
|
||||
tracesSampleRate: 0.5, // Capture 50% of the transactions
|
||||
tracesSampleRate: import.meta.env.PROD ? 0.5 : 1.0, // Capture 50% of the transactions
|
||||
// Set profilesSampleRate to 1.0 to profile every transaction.
|
||||
// Since profilesSampleRate is relative to tracesSampleRate,
|
||||
// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
|
||||
@@ -61,7 +55,7 @@ export function getSentryOrCompute(enabled = false, uuid: string, isSteam: boole
|
||||
// results in 25% of transactions being profiled (0.5*0.5=0.25)
|
||||
profilesSampleRate: 0.2,
|
||||
// Session Replay
|
||||
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
||||
replaysSessionSampleRate: import.meta.env.PROD ? 0.1 : 1.0, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
||||
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
|
||||
normalizeDepth: 8,
|
||||
enabled,
|
||||
|
||||
@@ -2,5 +2,5 @@ package dev.slimevr
|
||||
|
||||
data class FeatureFlags(
|
||||
var steam: Boolean = false,
|
||||
var skipCheckUdev: Boolean = true,
|
||||
var skipCheckUdev: Boolean = false,
|
||||
)
|
||||
@@ -5,7 +5,7 @@ data class NetworkInfo(
|
||||
val description: String?,
|
||||
val category: NetworkCategory?,
|
||||
val connectivity: Set<ConnectivityFlags>?,
|
||||
val connected: Boolean,
|
||||
val connected: Boolean?,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -18,7 +18,7 @@ enum class NetworkCategory(val value: Int) {
|
||||
;
|
||||
|
||||
companion object {
|
||||
fun fromInt(value: Int) = entries.find { it.value == value }
|
||||
fun fromInt(value: Int) = values().find { it.value == value }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ enum class ConnectivityFlags(val value: Int) {
|
||||
fun fromInt(value: Int): Set<ConnectivityFlags> = if (value == 0) {
|
||||
setOf(DISCONNECTED)
|
||||
} else {
|
||||
entries.filter { it != DISCONNECTED && (value and it.value) != 0 }.toSet()
|
||||
values().filter { it != DISCONNECTED && (value and it.value) != 0 }.toSet()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ abstract class NetworkProfileChecker {
|
||||
abstract val publicNetworks: List<NetworkInfo>
|
||||
}
|
||||
|
||||
class StubNetworkProfileChecker : NetworkProfileChecker() {
|
||||
class NetworkProfileCheckerStub : NetworkProfileChecker() {
|
||||
override val isSupported: Boolean
|
||||
get() = false
|
||||
override val publicNetworks: List<NetworkInfo>
|
||||
|
||||
@@ -61,7 +61,7 @@ class VRServer @JvmOverloads constructor(
|
||||
serialHandlerProvider: (VRServer) -> SerialHandler = { _ -> SerialHandlerStub() },
|
||||
flashingHandlerProvider: (VRServer) -> SerialFlashingHandler? = { _ -> null },
|
||||
vrcConfigHandlerProvider: (VRServer) -> VRCConfigHandler = { _ -> VRCConfigHandlerStub() },
|
||||
networkProfileProvider: (VRServer) -> NetworkProfileChecker = { _ -> StubNetworkProfileChecker() },
|
||||
networkProfileProvider: (VRServer) -> NetworkProfileChecker = { _ -> NetworkProfileCheckerStub() },
|
||||
acquireMulticastLock: () -> Any? = { null },
|
||||
@JvmField val configManager: ConfigManager,
|
||||
) : Thread("VRServer") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package dev.slimevr.config
|
||||
|
||||
import com.jme3.math.FastMath
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
|
||||
// handles the tap detection config
|
||||
// this involves the number of taps, the delay, and whether or not the feature is enabled
|
||||
@@ -12,9 +12,6 @@ class TapDetectionConfig {
|
||||
var yawResetEnabled = true
|
||||
var fullResetEnabled = true
|
||||
var mountingResetEnabled = true
|
||||
var yawResetTracker = TrackerPosition.CHEST
|
||||
var mountingResetTracker = TrackerPosition.RIGHT_UPPER_LEG
|
||||
var fullResetTracker = TrackerPosition.LEFT_UPPER_LEG
|
||||
var setupMode = false
|
||||
var yawResetTaps = 2
|
||||
set(yawResetTaps) {
|
||||
|
||||
@@ -58,8 +58,6 @@ class VRConfig {
|
||||
|
||||
val trackingChecklist: TrackingChecklistConfig = TrackingChecklistConfig()
|
||||
|
||||
val velocityConfig: VelocityConfig = VelocityConfig()
|
||||
|
||||
val vrcConfig: VRCConfig = VRCConfig()
|
||||
|
||||
init {
|
||||
@@ -121,7 +119,6 @@ class VRConfig {
|
||||
.readFilteringConfig(filters, tracker.getRotation())
|
||||
}
|
||||
}
|
||||
tracker.allowVelocity = velocityConfig.sendDerivedVelocity
|
||||
}
|
||||
|
||||
fun writeTrackerConfig(tracker: Tracker?) {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package dev.slimevr.config
|
||||
|
||||
import dev.slimevr.VRServer
|
||||
|
||||
/**
|
||||
* Allows to enable/disable sending of optional derived velocity data via Protobuf.
|
||||
* Enables Natural Locomotion Support
|
||||
* May create overprediction in certain titles causing excessive jitter when moving upper body.
|
||||
*/
|
||||
class VelocityConfig {
|
||||
// Disables derived velocity for all trackers. Driver zeroes out velocity if nothing is returned in protobuf message.
|
||||
var sendDerivedVelocity: Boolean = false
|
||||
|
||||
fun updateTrackersVelocitySettings() {
|
||||
for (t in VRServer.instance.allTrackers) {
|
||||
t.allowVelocity = sendDerivedVelocity
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,6 @@ import dev.slimevr.osc.UnityBone.Companion.getByStringVal
|
||||
import dev.slimevr.tracking.processor.BoneType
|
||||
import dev.slimevr.tracking.processor.HumanPoseManager
|
||||
import dev.slimevr.tracking.trackers.Device
|
||||
import dev.slimevr.tracking.trackers.DeviceOrigin
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
import dev.slimevr.tracking.trackers.TrackerStatus
|
||||
@@ -271,7 +270,7 @@ class VMCHandler(
|
||||
// Create device if it doesn't exist
|
||||
var rot = rotation
|
||||
if (trackerDevice == null) {
|
||||
trackerDevice = server.deviceManager.createDevice(DeviceOrigin.VMC, "VMC receiver", "1.0", "VMC")
|
||||
trackerDevice = server.deviceManager.createDevice("VMC receiver", "1.0", "VMC")
|
||||
server.deviceManager.addDevice(trackerDevice!!)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.jme3.system.NanoTimer
|
||||
import dev.slimevr.VRServer
|
||||
import dev.slimevr.config.VRCOSCConfig
|
||||
import dev.slimevr.tracking.trackers.Device
|
||||
import dev.slimevr.tracking.trackers.DeviceOrigin
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
import dev.slimevr.tracking.trackers.TrackerStatus
|
||||
@@ -329,7 +328,7 @@ class VRCOSCHandler(
|
||||
// Create device if it doesn't exist
|
||||
if (vrsystemTrackersDevice == null) {
|
||||
// Instantiate OSC Trackers device
|
||||
vrsystemTrackersDevice = server.deviceManager.createDevice(DeviceOrigin.VRCHAT, "VRC VRSystem", null, "VRChat")
|
||||
vrsystemTrackersDevice = server.deviceManager.createDevice("VRC VRSystem", null, "VRChat")
|
||||
server.deviceManager.addDevice(vrsystemTrackersDevice!!)
|
||||
}
|
||||
|
||||
@@ -405,7 +404,7 @@ class VRCOSCHandler(
|
||||
// Receiving OSC Trackers data. This is not from VRChat.
|
||||
if (oscTrackersDevice == null) {
|
||||
// Instantiate OSC Trackers device
|
||||
oscTrackersDevice = server.deviceManager.createDevice(DeviceOrigin.OSC, "OSC Tracker", null, "OSC Trackers")
|
||||
oscTrackersDevice = server.deviceManager.createDevice("OSC Tracker", null, "OSC Trackers")
|
||||
server.deviceManager.addDevice(oscTrackersDevice!!)
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import dev.slimevr.config.StayAlignedConfig
|
||||
import dev.slimevr.config.TapDetectionConfig
|
||||
import dev.slimevr.config.VMCConfig
|
||||
import dev.slimevr.config.VRCOSCConfig
|
||||
import dev.slimevr.config.VelocityConfig
|
||||
import dev.slimevr.filtering.TrackerFilters.Companion.getByConfigkey
|
||||
import dev.slimevr.tracking.processor.HumanPoseManager
|
||||
import dev.slimevr.tracking.processor.config.SkeletonConfigToggles
|
||||
@@ -35,8 +34,6 @@ import solarxr_protocol.rpc.SteamVRTrackersSetting
|
||||
import solarxr_protocol.rpc.TapDetectionSettings
|
||||
import solarxr_protocol.rpc.VMCOSCSettings
|
||||
import solarxr_protocol.rpc.VRCOSCSettings
|
||||
import solarxr_protocol.rpc.VRMSettings
|
||||
import solarxr_protocol.rpc.VelocitySettings
|
||||
import solarxr_protocol.rpc.settings.LegTweaksSettings
|
||||
import solarxr_protocol.rpc.settings.ModelRatios
|
||||
import solarxr_protocol.rpc.settings.ModelSettings
|
||||
@@ -114,25 +111,17 @@ fun createVMCOSCSettings(
|
||||
addressStringOffset,
|
||||
)
|
||||
|
||||
VMCOSCSettings.startVMCOSCSettings(fbb)
|
||||
VMCOSCSettings.addOscSettings(fbb, generalSettingOffset)
|
||||
VMCOSCSettings.addAnchorHip(fbb, config.anchorHip)
|
||||
VMCOSCSettings.addMirrorTracking(fbb, config.mirrorTracking)
|
||||
|
||||
return VMCOSCSettings.endVMCOSCSettings(fbb)
|
||||
}
|
||||
|
||||
fun createVRMSettings(
|
||||
fbb: FlatBufferBuilder,
|
||||
config: VMCConfig,
|
||||
): Int {
|
||||
val vrmJson = config.vrmJson
|
||||
var vrmJsonOffset = 0
|
||||
if (vrmJson != null) vrmJsonOffset = fbb.createString(vrmJson)
|
||||
|
||||
VRMSettings.startVRMSettings(fbb)
|
||||
if (vrmJson != null) VRMSettings.addVrmJson(fbb, vrmJsonOffset)
|
||||
return VRMSettings.endVRMSettings(fbb)
|
||||
VMCOSCSettings.startVMCOSCSettings(fbb)
|
||||
VMCOSCSettings.addOscSettings(fbb, generalSettingOffset)
|
||||
if (vrmJson != null) VMCOSCSettings.addVrmJson(fbb, vrmJsonOffset)
|
||||
VMCOSCSettings.addAnchorHip(fbb, config.anchorHip)
|
||||
VMCOSCSettings.addMirrorTracking(fbb, config.mirrorTracking)
|
||||
|
||||
return VMCOSCSettings.endVMCOSCSettings(fbb)
|
||||
}
|
||||
|
||||
fun createFilterSettings(
|
||||
@@ -174,9 +163,9 @@ fun createTapDetectionSettings(
|
||||
tapDetectionConfig.mountingResetTaps,
|
||||
tapDetectionConfig.setupMode,
|
||||
tapDetectionConfig.numberTrackersOverThreshold,
|
||||
tapDetectionConfig.yawResetTracker.bodyPart,
|
||||
tapDetectionConfig.fullResetTracker.bodyPart,
|
||||
tapDetectionConfig.mountingResetTracker.bodyPart,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
)
|
||||
|
||||
fun createSteamVRSettings(fbb: FlatBufferBuilder, bridge: ISteamVRBridge?): Int {
|
||||
@@ -438,11 +427,6 @@ fun createSettingsResponse(fbb: FlatBufferBuilder, server: VRServer): Int {
|
||||
),
|
||||
createHIDSettings(fbb, server.configManager.vrConfig.hidConfig),
|
||||
0,
|
||||
createVelocitySettings(fbb, server.configManager.vrConfig.velocityConfig),
|
||||
createVRMSettings(
|
||||
fbb,
|
||||
server.configManager.vrConfig.vmc,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -478,12 +462,3 @@ fun createHIDSettings(
|
||||
fbb,
|
||||
config.trackersOverHID,
|
||||
)
|
||||
|
||||
fun createVelocitySettings(
|
||||
fbb: FlatBufferBuilder,
|
||||
config: VelocityConfig,
|
||||
): Int = VelocitySettings
|
||||
.createVelocitySettings(
|
||||
fbb,
|
||||
config.sendDerivedVelocity,
|
||||
)
|
||||
@@ -9,7 +9,6 @@ import dev.slimevr.protocol.ProtocolAPI
|
||||
import dev.slimevr.protocol.rpc.RPCHandler
|
||||
import dev.slimevr.tracking.processor.config.SkeletonConfigToggles
|
||||
import dev.slimevr.tracking.processor.config.SkeletonConfigValues
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
import dev.slimevr.tracking.trackers.TrackerRole
|
||||
import solarxr_protocol.rpc.ChangeSettingsRequest
|
||||
import solarxr_protocol.rpc.RpcMessage
|
||||
@@ -128,6 +127,7 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) {
|
||||
val vmcConfig = api.server.configManager
|
||||
.vrConfig
|
||||
.vmc
|
||||
val vmcHandler = api.server.vMCHandler
|
||||
val osc = req.vmcOsc().oscSettings()
|
||||
|
||||
if (osc != null) {
|
||||
@@ -136,21 +136,12 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) {
|
||||
vmcConfig.portOut = osc.portOut()
|
||||
vmcConfig.address = osc.address()
|
||||
}
|
||||
if (req.vmcOsc().vrmJson() != null) {
|
||||
vmcConfig.vrmJson = req.vmcOsc().vrmJson().ifEmpty { null }
|
||||
}
|
||||
vmcConfig.anchorHip = req.vmcOsc().anchorHip()
|
||||
vmcConfig.mirrorTracking = req.vmcOsc().mirrorTracking()
|
||||
}
|
||||
|
||||
if (req.vrm() != null) {
|
||||
val vmcConfig = api.server.configManager
|
||||
.vrConfig
|
||||
.vmc
|
||||
if (req.vrm().vrmJson() != null) {
|
||||
vmcConfig.vrmJson = req.vrm().vrmJson().ifEmpty { null }
|
||||
}
|
||||
}
|
||||
|
||||
if (req.vmcOsc() != null || req.vrm() != null) {
|
||||
val vmcHandler = api.server.vMCHandler
|
||||
vmcHandler.refreshSettings(true)
|
||||
}
|
||||
|
||||
@@ -168,10 +159,6 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) {
|
||||
.mountingResetEnabled = tapDetectionSettings.mountingResetEnabled()
|
||||
tapDetectionConfig.setupMode = tapDetectionSettings.setupMode()
|
||||
|
||||
tapDetectionConfig.yawResetTracker = TrackerPosition.getByBodyPart(tapDetectionSettings.yawResetTracker()) ?: TrackerPosition.CHEST
|
||||
tapDetectionConfig.fullResetTracker = TrackerPosition.getByBodyPart(tapDetectionSettings.fullResetTracker()) ?: TrackerPosition.LEFT_UPPER_LEG
|
||||
tapDetectionConfig.mountingResetTracker = TrackerPosition.getByBodyPart(tapDetectionSettings.mountingResetTracker()) ?: TrackerPosition.RIGHT_UPPER_LEG
|
||||
|
||||
// set number of trackers that can have high accel before taps
|
||||
// are rejected
|
||||
if (tapDetectionSettings.hasNumberTrackersOverThreshold()) {
|
||||
@@ -375,12 +362,6 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) {
|
||||
config.trackersOverHID = requestConfig.trackersOverHid()
|
||||
}
|
||||
|
||||
if (req.velocitySettings() != null) {
|
||||
val velocityConfig = api.server.configManager.vrConfig.velocityConfig
|
||||
velocityConfig.sendDerivedVelocity = req.velocitySettings().sendDerivedVelocity()
|
||||
velocityConfig.updateTrackersVelocitySettings()
|
||||
}
|
||||
|
||||
api.server.configManager.saveConfig()
|
||||
}
|
||||
|
||||
@@ -398,7 +379,7 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) {
|
||||
val settings = SettingsResponse
|
||||
.createSettingsResponse(
|
||||
fbb,
|
||||
createSteamVRSettings(fbb, bridge), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
createSteamVRSettings(fbb, bridge), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
)
|
||||
val outbound =
|
||||
rpcHandler.createRPCMessage(fbb, RpcMessage.SettingsResponse, settings)
|
||||
|
||||
@@ -1171,7 +1171,6 @@ class HumanSkeleton(
|
||||
it.position = trackerBone.getTailPosition()
|
||||
it.setRotation(trackerBone.getGlobalRotation() * trackerBone.rotationOffset.inv())
|
||||
it.dataTick()
|
||||
it.updateDerivedVelocity()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,15 +6,7 @@ import java.util.*
|
||||
// class that monitors the acceleration of the waist, hip, chest or upper chest trackers to detect taps
|
||||
// and use this to trigger a variety of resets (if your wondering why no single tap class exists, it's because
|
||||
// to many false positives)
|
||||
class TapDetection(
|
||||
val skeleton: HumanSkeleton,
|
||||
val trackerToWatch: Tracker,
|
||||
// The maximum number of trackers that can accelerate faster than ALLOWED_BODY_ACCEL
|
||||
// before tap detection will deactivate
|
||||
val maxAllowedMovingTrackers: Int,
|
||||
val tapToComplete: Int,
|
||||
val onTapCompleted: () -> Unit,
|
||||
) {
|
||||
class TapDetection(val skeleton: HumanSkeleton, val trackerToWatch: Tracker, val numberTrackersOverThreshold: Int, val tapToComplete: Int, val onTapCompleted: () -> Unit) {
|
||||
|
||||
private val accelList = LinkedList<FloatArray>()
|
||||
private val tapTimestamps = LinkedList<Float>()
|
||||
@@ -100,20 +92,64 @@ class TapDetection(
|
||||
// force on any of the torso or upper leg trackers (this sadly implies that
|
||||
// you need two or more trackers for this feature to be reliable)
|
||||
private fun isUserStatic(trackerToExclude: Tracker): Boolean {
|
||||
val trackersToCheck = arrayOf(
|
||||
skeleton.upperChestTracker,
|
||||
skeleton.chestTracker,
|
||||
skeleton.hipTracker,
|
||||
skeleton.waistTracker,
|
||||
skeleton.leftUpperLegTracker,
|
||||
skeleton.rightUpperLegTracker,
|
||||
skeleton.leftFootTracker,
|
||||
skeleton.rightFootTracker,
|
||||
)
|
||||
val numMovingTrackers = trackersToCheck.count {
|
||||
it != null && it != trackerToExclude && it.getAcceleration().lenSq() > ALLOWED_BODY_ACCEL_SQUARED
|
||||
var num = 0
|
||||
if (skeleton.upperChestTracker != null &&
|
||||
skeleton.upperChestTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.upperChestTracker!!.getAcceleration().lenSq()
|
||||
> ALLOWED_BODY_ACCEL_SQUARED
|
||||
) {
|
||||
num++
|
||||
}
|
||||
}
|
||||
return numMovingTrackers < maxAllowedMovingTrackers
|
||||
if (skeleton.chestTracker != null &&
|
||||
skeleton.chestTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.chestTracker!!.getAcceleration().lenSq() > ALLOWED_BODY_ACCEL_SQUARED) num++
|
||||
}
|
||||
if (skeleton.hipTracker != null && skeleton.hipTracker != trackerToExclude) {
|
||||
if (skeleton.hipTracker!!.getAcceleration().lenSq() > ALLOWED_BODY_ACCEL_SQUARED) num++
|
||||
}
|
||||
if (skeleton.waistTracker != null &&
|
||||
skeleton.waistTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.waistTracker!!.getAcceleration().lenSq() > ALLOWED_BODY_ACCEL_SQUARED) num++
|
||||
}
|
||||
if (skeleton.leftUpperLegTracker != null &&
|
||||
skeleton.leftUpperLegTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.leftUpperLegTracker!!.getAcceleration().lenSq()
|
||||
> ALLOWED_BODY_ACCEL_SQUARED
|
||||
) {
|
||||
num++
|
||||
}
|
||||
}
|
||||
if (skeleton.rightUpperLegTracker != null &&
|
||||
skeleton.rightUpperLegTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.rightUpperLegTracker!!.getAcceleration().lenSq()
|
||||
> ALLOWED_BODY_ACCEL_SQUARED
|
||||
) {
|
||||
num++
|
||||
}
|
||||
}
|
||||
if (skeleton.leftFootTracker != null &&
|
||||
skeleton.leftFootTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.leftFootTracker!!.getAcceleration().lenSq() > ALLOWED_BODY_ACCEL_SQUARED) {
|
||||
num++
|
||||
}
|
||||
}
|
||||
if (skeleton.rightFootTracker != null &&
|
||||
skeleton.rightFootTracker != trackerToExclude
|
||||
) {
|
||||
if (skeleton.rightFootTracker!!.getAcceleration().lenSq()
|
||||
> ALLOWED_BODY_ACCEL_SQUARED
|
||||
) {
|
||||
num++
|
||||
}
|
||||
}
|
||||
return num < numberTrackersOverThreshold
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+8
-14
@@ -3,9 +3,6 @@ package dev.slimevr.tracking.processor.skeleton
|
||||
import dev.slimevr.VRServer
|
||||
import dev.slimevr.tracking.processor.HumanPoseManager
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
import dev.slimevr.tracking.trackers.TrackerUtils
|
||||
import io.eiren.util.logging.LogManager
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
|
||||
class TapDetectionManager(
|
||||
@@ -91,29 +88,26 @@ class TapDetectionManager(
|
||||
private val mountingResetTracker: Tracker?
|
||||
get() {
|
||||
return arrayOf(
|
||||
TrackerUtils.getTrackerForSkeleton(server.allTrackers, config.mountingResetTracker),
|
||||
if (config.yawResetTracker !== TrackerPosition.RIGHT_UPPER_LEG && config.fullResetTracker !== TrackerPosition.RIGHT_UPPER_LEG) skeleton.rightUpperLegTracker else null,
|
||||
if (config.yawResetTracker !== TrackerPosition.RIGHT_LOWER_LEG && config.fullResetTracker !== TrackerPosition.RIGHT_LOWER_LEG) skeleton.rightLowerLegTracker else null,
|
||||
skeleton.rightUpperLegTracker,
|
||||
skeleton.rightLowerLegTracker,
|
||||
).firstNotNullOfOrNull { it }
|
||||
}
|
||||
|
||||
private val fullResetTracker: Tracker?
|
||||
get() {
|
||||
return arrayOf(
|
||||
TrackerUtils.getTrackerForSkeleton(server.allTrackers, config.fullResetTracker),
|
||||
if (config.yawResetTracker !== TrackerPosition.LEFT_UPPER_LEG && config.mountingResetTracker !== TrackerPosition.LEFT_UPPER_LEG) skeleton.leftUpperLegTracker else null,
|
||||
if (config.yawResetTracker !== TrackerPosition.LEFT_LOWER_LEG && config.mountingResetTracker !== TrackerPosition.LEFT_LOWER_LEG) skeleton.leftLowerLegTracker else null,
|
||||
skeleton.leftUpperLegTracker,
|
||||
skeleton.leftLowerLegTracker,
|
||||
).firstNotNullOfOrNull { it }
|
||||
}
|
||||
|
||||
private val yawResetTracker: Tracker?
|
||||
get() {
|
||||
return arrayOf(
|
||||
TrackerUtils.getTrackerForSkeleton(server.allTrackers, config.yawResetTracker),
|
||||
if (config.fullResetTracker !== TrackerPosition.UPPER_CHEST && config.mountingResetTracker !== TrackerPosition.UPPER_CHEST) skeleton.upperChestTracker else null,
|
||||
if (config.fullResetTracker !== TrackerPosition.CHEST && config.mountingResetTracker !== TrackerPosition.CHEST) skeleton.chestTracker else null,
|
||||
if (config.fullResetTracker !== TrackerPosition.HIP && config.mountingResetTracker !== TrackerPosition.HIP) skeleton.hipTracker else null,
|
||||
if (config.fullResetTracker !== TrackerPosition.WAIST && config.mountingResetTracker !== TrackerPosition.WAIST) skeleton.waistTracker else null,
|
||||
skeleton.upperChestTracker,
|
||||
skeleton.chestTracker,
|
||||
skeleton.hipTracker,
|
||||
skeleton.waistTracker,
|
||||
).firstNotNullOfOrNull { it }
|
||||
}
|
||||
|
||||
|
||||
@@ -9,18 +9,7 @@ import kotlinx.coroutines.launch
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
enum class DeviceOrigin {
|
||||
HID,
|
||||
UDP,
|
||||
VRCHAT,
|
||||
OSC,
|
||||
VMC,
|
||||
STEAMVR,
|
||||
SOLARXR,
|
||||
WEBSOCKET,
|
||||
}
|
||||
|
||||
open class Device(val origin: DeviceOrigin, val magSupport: Boolean = false) {
|
||||
open class Device(val magSupport: Boolean = false) {
|
||||
open val id: Int = nextLocalDeviceId.incrementAndGet()
|
||||
open var name: String? = null
|
||||
open var firmwareVersion: String? = null
|
||||
@@ -37,6 +26,9 @@ open class Device(val origin: DeviceOrigin, val magSupport: Boolean = false) {
|
||||
|
||||
open val hardwareIdentifier: String = "Unknown"
|
||||
|
||||
val isOpenVrDevice: Boolean
|
||||
get() = manufacturer == "OpenVR"
|
||||
|
||||
init {
|
||||
CoroutineScope(Job()).launch {
|
||||
// Wait a little for device to get configured
|
||||
|
||||
@@ -5,8 +5,8 @@ import io.eiren.util.collections.FastList
|
||||
|
||||
class DeviceManager(private val server: VRServer) {
|
||||
val devices = FastList<Device>()
|
||||
fun createDevice(origin: DeviceOrigin, name: String?, version: String?, manufacturer: String?): Device {
|
||||
val device = Device(origin)
|
||||
fun createDevice(name: String?, version: String?, manufacturer: String?): Device {
|
||||
val device = Device()
|
||||
device.name = name
|
||||
device.firmwareVersion = version
|
||||
device.manufacturer = manufacturer
|
||||
|
||||
@@ -12,10 +12,6 @@ import io.eiren.util.BufferedTimer
|
||||
import io.github.axisangles.ktmath.Quaternion
|
||||
import io.github.axisangles.ktmath.Vector3
|
||||
import kotlin.properties.Delegates
|
||||
import kotlin.time.Duration.Companion.microseconds
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.DurationUnit
|
||||
import kotlin.time.TimeSource
|
||||
|
||||
const val TIMEOUT_MS = 2_000L
|
||||
const val DISCONNECT_MS = 3_000L + TIMEOUT_MS
|
||||
@@ -79,11 +75,6 @@ class Tracker @JvmOverloads constructor(
|
||||
*/
|
||||
val allowMounting: Boolean = false,
|
||||
|
||||
/**
|
||||
* If true, the tracker will send Derived Velocity.
|
||||
*/
|
||||
var allowVelocity: Boolean = false,
|
||||
|
||||
val isHmd: Boolean = false,
|
||||
|
||||
/**
|
||||
@@ -120,19 +111,7 @@ class Tracker @JvmOverloads constructor(
|
||||
// IMU: +z forward, +x left, +y up
|
||||
// SlimeVR: +z backward, +x right, +y up
|
||||
private var _acceleration = Vector3.NULL
|
||||
private var _velocity = Vector3.NULL
|
||||
private var _magVector = Vector3.NULL
|
||||
|
||||
/**
|
||||
* Velocity state server-side differentiation based on sent poses
|
||||
*/
|
||||
private data class VelocityState(
|
||||
var prevMark: TimeSource.Monotonic.ValueTimeMark? = null,
|
||||
var prevPos: Vector3 = Vector3(0f, 0f, 0f),
|
||||
)
|
||||
|
||||
private val velocityState = VelocityState()
|
||||
|
||||
var position = Vector3.NULL
|
||||
val resetsHandler: TrackerResetsHandler = TrackerResetsHandler(this)
|
||||
val filteringHandler: TrackerFilteringHandler = TrackerFilteringHandler()
|
||||
@@ -366,39 +345,6 @@ class Tracker @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If derived velocity is enabled, updates the derived velocity of the tracker,
|
||||
* calculating it based on the position displacement since the last update,
|
||||
* applying a sanity check on the time delta to filter out noise and ensure data stability.
|
||||
*/
|
||||
fun updateDerivedVelocity() {
|
||||
if (!allowVelocity || !hasPosition) {
|
||||
velocityState.prevMark = null
|
||||
_velocity = Vector3.NULL
|
||||
return
|
||||
}
|
||||
|
||||
val pos = position
|
||||
val now = TimeSource.Monotonic.markNow()
|
||||
|
||||
val prevMark = velocityState.prevMark
|
||||
if (prevMark != null) {
|
||||
val dt = now - prevMark
|
||||
if (dt in 100.microseconds..250.milliseconds) {
|
||||
val dtSeconds = dt.toDouble(DurationUnit.SECONDS)
|
||||
_velocity = Vector3(
|
||||
((pos.x - velocityState.prevPos.x) / dtSeconds).toFloat(),
|
||||
((pos.y - velocityState.prevPos.y) / dtSeconds).toFloat(),
|
||||
((pos.z - velocityState.prevPos.z) / dtSeconds).toFloat(),
|
||||
)
|
||||
} else {
|
||||
_velocity = Vector3.NULL
|
||||
}
|
||||
}
|
||||
velocityState.prevMark = now
|
||||
velocityState.prevPos = pos
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the identity-adjusted tracker rotation after the resetsHandler's corrections
|
||||
* (identity reset, drift and identity mounting).
|
||||
@@ -475,24 +421,6 @@ class Tracker @JvmOverloads constructor(
|
||||
this._acceleration = vec
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the derived velocity of the tracker.
|
||||
*/
|
||||
fun setVelocity(vec: Vector3) {
|
||||
this._velocity = if (allowVelocity) vec else Vector3.NULL
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the derived velocity of the tracker.
|
||||
*/
|
||||
fun getVelocity(): Vector3 = _velocity
|
||||
|
||||
/**
|
||||
* True if the tracker has valid velocity data.
|
||||
*/
|
||||
val hasVelocity: Boolean
|
||||
get() = allowVelocity && _velocity != Vector3.NULL
|
||||
|
||||
/**
|
||||
* True if the raw rotation is coming directly from an IMU (no cameras or lighthouses)
|
||||
* For example, flex sensor trackers are not considered as IMU trackers (see TrackerDataType)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package dev.slimevr.tracking.trackers.hid
|
||||
|
||||
import dev.slimevr.tracking.trackers.Device
|
||||
import dev.slimevr.tracking.trackers.DeviceOrigin
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import dev.slimevr.tracking.trackers.udp.BoardType
|
||||
import dev.slimevr.tracking.trackers.udp.MCUType
|
||||
|
||||
class HIDDevice(val hidId: Int) : Device(DeviceOrigin.HID) {
|
||||
class HIDDevice(val hidId: Int) : Device() {
|
||||
override var hardwareIdentifier: String = "Unknown"
|
||||
override var boardType: BoardType = BoardType.UNKNOWN
|
||||
override var mcuType: MCUType = MCUType.UNKNOWN
|
||||
|
||||
@@ -3,7 +3,6 @@ package dev.slimevr.tracking.trackers.udp
|
||||
import dev.slimevr.NetworkProtocol
|
||||
import dev.slimevr.VRServer
|
||||
import dev.slimevr.tracking.trackers.Device
|
||||
import dev.slimevr.tracking.trackers.DeviceOrigin
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import java.net.InetAddress
|
||||
import java.net.SocketAddress
|
||||
@@ -15,7 +14,7 @@ class UDPDevice(
|
||||
override val hardwareIdentifier: String,
|
||||
override val boardType: BoardType = BoardType.UNKNOWN,
|
||||
override val mcuType: MCUType = MCUType.UNKNOWN,
|
||||
) : Device(DeviceOrigin.UDP, true) {
|
||||
) : Device(true) {
|
||||
|
||||
override val id: Int = nextLocalDeviceId.incrementAndGet()
|
||||
|
||||
|
||||
@@ -114,7 +114,6 @@ class UDPProtocolParser {
|
||||
PACKET_TEMPERATURE -> UDPPacket20Temperature()
|
||||
PACKET_USER_ACTION -> UDPPacket21UserAction()
|
||||
PACKET_FEATURE_FLAGS -> UDPPacket22FeatureFlags()
|
||||
PACKET_ROTATION_AND_ACCELERATION -> UDPPacket23RotationAndAcceleration()
|
||||
PACKET_ACK_CONFIG_CHANGE -> UDPPacket24AckConfigChange()
|
||||
PACKET_FLEX_DATA -> UDPPacket26FlexData()
|
||||
PACKET_POSITION -> UDPPacket27Position()
|
||||
|
||||
@@ -6,7 +6,6 @@ import dev.slimevr.VRServer
|
||||
import dev.slimevr.VRServer.Companion.getNextLocalTrackerId
|
||||
import dev.slimevr.VRServer.Companion.instance
|
||||
import dev.slimevr.bridge.Bridge
|
||||
import dev.slimevr.tracking.trackers.DeviceOrigin
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
import dev.slimevr.tracking.trackers.TrackerStatus
|
||||
@@ -64,7 +63,7 @@ class WebSocketVRBridge(
|
||||
if (hmdTracker == null) {
|
||||
// Create HMD for websocket
|
||||
val hmdDevice = server.deviceManager
|
||||
.createDevice(DeviceOrigin.WEBSOCKET, "WebSocketVRBridge", null, null)
|
||||
.createDevice("WebSocketVRBridge", null, null)
|
||||
hmdTracker = Tracker(
|
||||
null,
|
||||
getNextLocalTrackerId(),
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
package dev.slimevr.desktop
|
||||
|
||||
import com.sun.jna.Native
|
||||
import com.sun.jna.Pointer
|
||||
import com.sun.jna.platform.win32.COM.COMException
|
||||
import com.sun.jna.platform.win32.COM.COMUtils
|
||||
import com.sun.jna.platform.win32.COM.Dispatch
|
||||
import com.sun.jna.platform.win32.Guid.CLSID
|
||||
import com.sun.jna.platform.win32.Guid.IID
|
||||
import com.sun.jna.platform.win32.IPHlpAPI
|
||||
import com.sun.jna.platform.win32.IPHlpAPI.AF_UNSPEC
|
||||
import com.sun.jna.platform.win32.OaIdl.VARIANT_BOOLByReference
|
||||
import com.sun.jna.platform.win32.Ole32
|
||||
import com.sun.jna.platform.win32.OleAuto
|
||||
import com.sun.jna.platform.win32.WTypes
|
||||
import com.sun.jna.platform.win32.WinDef
|
||||
import com.sun.jna.platform.win32.WinError
|
||||
import com.sun.jna.platform.win32.WinNT
|
||||
import com.sun.jna.platform.win32.WinNT.HRESULT
|
||||
import com.sun.jna.ptr.IntByReference
|
||||
import com.sun.jna.ptr.PointerByReference
|
||||
import com.sun.jna.win32.StdCallLibrary
|
||||
import dev.slimevr.ConnectivityFlags
|
||||
import dev.slimevr.NetworkCategory
|
||||
import dev.slimevr.NetworkInfo
|
||||
import dev.slimevr.NetworkProfileChecker
|
||||
import dev.slimevr.VRServer
|
||||
import io.eiren.util.OperatingSystem
|
||||
import io.eiren.util.logging.LogManager
|
||||
import java.util.*
|
||||
import kotlin.concurrent.scheduleAtFixedRate
|
||||
|
||||
/**
|
||||
* @see <a href="https://learn.microsoft.com/en-us/windows/win32/api/netlistmgr/nn-netlistmgr-inetworkconnection">INetworkConnection interface (netlistmgr.h)</a>
|
||||
@@ -239,44 +234,13 @@ constructor() : AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ktlint:standard:function-naming", "ktlint:standard:class-naming")
|
||||
interface NetIOAPI : IPHlpAPI {
|
||||
enum class MIB_NOTIFICATION_TYPE(val native: Int) {
|
||||
MibParameterNotification(0),
|
||||
MibAddInstance(1),
|
||||
MibDeleteInstance(2),
|
||||
MibInitialNotification(3),
|
||||
;
|
||||
|
||||
companion object {
|
||||
fun fromNative(native: Int) = byNative[native]
|
||||
private val byNative = entries.associateBy { it.native }
|
||||
}
|
||||
}
|
||||
interface IPINTERFACE_CHANGE_CALLBACK : StdCallLibrary.StdCallCallback {
|
||||
fun callback(
|
||||
context: Pointer?,
|
||||
row: Pointer?,
|
||||
/* MIB_NOTIFICATION_TYPE */
|
||||
notificationType: Int,
|
||||
)
|
||||
}
|
||||
|
||||
fun NotifyIpInterfaceChange(family: Int, callback: IPINTERFACE_CHANGE_CALLBACK, context: Pointer?, initialNotification: WinDef.BOOL, notificationHandle: WinNT.HANDLEByReference): Long
|
||||
fun CancelMibChangeNotify2(notificationHandle: WinNT.HANDLE): Long
|
||||
|
||||
companion object {
|
||||
val INSTANCE: NetIOAPI = Native.load("Iphlpapi", NetIOAPI::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
fun enumerateNetworks(): List<NetworkInfo>? {
|
||||
if (OperatingSystem.currentPlatform != OperatingSystem.WINDOWS) {
|
||||
return null
|
||||
}
|
||||
try {
|
||||
COMNetworkManager().use { netMgr ->
|
||||
netMgr.instance.GetNetworkConnections().use { conns ->
|
||||
COMNetworkManager().use { netmgr ->
|
||||
netmgr.instance.GetNetworkConnections().use { conns ->
|
||||
return generateSequence { conns.Next() }
|
||||
.map { conn ->
|
||||
conn.use {
|
||||
@@ -293,16 +257,14 @@ fun enumerateNetworks(): List<NetworkInfo>? {
|
||||
}.toList()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LogManager.severe("[DesktopNetworkProfileChecker] Exception when enumerating networks", e)
|
||||
} catch (err: Exception) {
|
||||
println(err.stackTraceToString())
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
class DesktopNetworkProfileChecker :
|
||||
NetworkProfileChecker(),
|
||||
Runnable {
|
||||
private val thread = Thread(this, "DesktopNetworkProfileChecker runner")
|
||||
class DesktopNetworkProfileChecker(private val server: VRServer) : NetworkProfileChecker() {
|
||||
private val updateTickTimer = Timer("NetworkProfileCheck")
|
||||
private var publicNetworksLocal: List<NetworkInfo> = listOf()
|
||||
|
||||
override val isSupported: Boolean
|
||||
@@ -312,40 +274,11 @@ class DesktopNetworkProfileChecker :
|
||||
get() = publicNetworksLocal
|
||||
|
||||
init {
|
||||
if (isSupported) {
|
||||
thread.start()
|
||||
}
|
||||
}
|
||||
|
||||
override fun run() {
|
||||
val handle = WinNT.HANDLEByReference()
|
||||
val callback = object : NetIOAPI.IPINTERFACE_CHANGE_CALLBACK {
|
||||
override fun callback(
|
||||
context: Pointer?,
|
||||
row: Pointer?,
|
||||
notificationType: Int,
|
||||
) {
|
||||
synchronized(publicNetworksLocal) {
|
||||
publicNetworksLocal = enumerateNetworks()?.filter { net ->
|
||||
net.connected && net.category == NetworkCategory.PUBLIC
|
||||
} ?: listOf()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val ret = NetIOAPI.INSTANCE.NotifyIpInterfaceChange(AF_UNSPEC, callback, null, WinDef.BOOL(true), handle)
|
||||
if (ret != WinError.ERROR_SUCCESS.toLong()) {
|
||||
LogManager.warning("[DesktopNetworkProfileChecker] Error registering network interface change callback, public interface detection will not work: $ret")
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
while (true) Thread.sleep(Long.MAX_VALUE)
|
||||
} catch (_: InterruptedException) {} finally {
|
||||
handle.value?.let {
|
||||
try {
|
||||
NetIOAPI.INSTANCE.CancelMibChangeNotify2(it)
|
||||
} catch (_: Exception) {}
|
||||
if (OperatingSystem.currentPlatform == OperatingSystem.WINDOWS) {
|
||||
this.updateTickTimer.scheduleAtFixedRate(0, 3000) {
|
||||
publicNetworksLocal = enumerateNetworks()?.filter { net ->
|
||||
net.connected == true && net.category == NetworkCategory.PUBLIC
|
||||
} ?: listOf()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ fun main(args: Array<String>) {
|
||||
{ _ -> DesktopSerialHandler() },
|
||||
{ _ -> DesktopSerialFlashingHandler() },
|
||||
{ _ -> DesktopVRCConfigHandler() },
|
||||
{ _ -> DesktopNetworkProfileChecker() },
|
||||
{ server -> DesktopNetworkProfileChecker(server) },
|
||||
configManager = configManager,
|
||||
)
|
||||
vrServer.start()
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.sun.jna.platform.win32.Advapi32Util
|
||||
import com.sun.jna.platform.win32.WinNT
|
||||
import com.sun.jna.platform.win32.WinReg
|
||||
import com.sun.jna.ptr.IntByReference
|
||||
import dev.slimevr.desktop.platform.linux.SteamUtils
|
||||
import io.eiren.util.logging.LogManager
|
||||
import java.io.BufferedReader
|
||||
import java.io.FileReader
|
||||
@@ -14,6 +13,8 @@ import java.io.InvalidObjectException
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
abstract class AbstractRegEdit {
|
||||
abstract fun getQwordValue(path: String, key: String): Double?
|
||||
@@ -71,7 +72,7 @@ class RegEditWindows : AbstractRegEdit() {
|
||||
keysMap[it.key.replace("""_h\d+$""".toRegex(), "")] = it.key
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LogManager.severe("[VRChatRegEdit] Error reading values from VRC registry: ${e.message}")
|
||||
LogManager.severe("[VRChatRegEdit] Error reading Values from VRC registry: ${e.message}")
|
||||
}
|
||||
return keysMap
|
||||
}
|
||||
@@ -91,13 +92,11 @@ class RegEditWindows : AbstractRegEdit() {
|
||||
}
|
||||
|
||||
class RegEditLinux : AbstractRegEdit() {
|
||||
private val userRegPath: Path? = SteamUtils.findAppLibraryLocation(438100)?.resolve(USER_REG_SUBPATH)
|
||||
|
||||
init {
|
||||
if (userRegPath == null) {
|
||||
if (USER_REG_PATH == null) {
|
||||
LogManager.info("[VRChatRegEdit] Couldn't find any VRChat registry file")
|
||||
} else {
|
||||
LogManager.info("[VRChatRegEdit] Using VRChat registry file: $userRegPath")
|
||||
LogManager.info("[VRChatRegEdit] Using VRChat registry file: $USER_REG_PATH")
|
||||
}
|
||||
}
|
||||
lateinit var registry: Map<String, String>
|
||||
@@ -130,7 +129,7 @@ class RegEditLinux : AbstractRegEdit() {
|
||||
val map = mutableMapOf<String, String>()
|
||||
|
||||
try {
|
||||
BufferedReader(FileReader(userRegPath?.toFile() ?: return keysMap)).use { reader ->
|
||||
BufferedReader(FileReader(USER_REG_PATH?.toFile() ?: return keysMap)).use { reader ->
|
||||
// The reg file uses double backward-slash for paths
|
||||
val actualPath = "[${path.replace("\\", """\\""")}]"
|
||||
while (reader.ready()) {
|
||||
@@ -142,7 +141,7 @@ class RegEditLinux : AbstractRegEdit() {
|
||||
val keyValue = reader.readLine()
|
||||
if (keyValue == "") break
|
||||
|
||||
REG_KEY_VALUE_PATTERN.matchEntire(keyValue)?.let {
|
||||
KEY_VALUE_PATTERN.matchEntire(keyValue)?.let {
|
||||
map[it.groupValues[1]] = it.groupValues[2]
|
||||
keysMap[it.groupValues[1].replace("""_h\d+$""".toRegex(), "")] = it.groupValues[1]
|
||||
}
|
||||
@@ -151,7 +150,7 @@ class RegEditLinux : AbstractRegEdit() {
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LogManager.severe("[VRChatRegEdit] Error reading values from VRC registry: ${e.message}")
|
||||
LogManager.severe("[VRChatRegEdit] Error reading Values from VRC registry: ${e.message}")
|
||||
}
|
||||
registry = map
|
||||
return keysMap
|
||||
@@ -161,9 +160,79 @@ class RegEditLinux : AbstractRegEdit() {
|
||||
override fun getKeyByPath(hkey: WinReg.HKEY, path: String): Map<String, String> = mutableMapOf<String, String>()
|
||||
|
||||
companion object {
|
||||
const val USER_REG_SUBPATH = "steamapps/compatdata/438100/pfx/user.reg"
|
||||
private fun findAppLibraryLocation(steamPath: Path, appId: Int): Path? {
|
||||
val keyValueRegex = Regex(""""(\w+)"[ \t]*(?:"(.+)")?""")
|
||||
try {
|
||||
BufferedReader(FileReader(steamPath.resolve("config/libraryfolders.vdf").toFile())).use { reader ->
|
||||
var depth = 0
|
||||
var currentLibraryPath: Path? = null
|
||||
|
||||
val REG_KEY_VALUE_PATTERN = Regex(""""(.+)"=(.+)""")
|
||||
while (reader.ready()) {
|
||||
val line = reader.readLine().trim()
|
||||
if (line == "{") {
|
||||
depth += 1
|
||||
continue
|
||||
}
|
||||
if (line == "}") {
|
||||
depth -= 1
|
||||
continue
|
||||
}
|
||||
|
||||
keyValueRegex.matchEntire(line)?.let {
|
||||
val key = it.groupValues[1]
|
||||
val value = it.groupValues[2]
|
||||
|
||||
when (depth) {
|
||||
0 -> {
|
||||
require(key == "libraryfolders") { "root key must be libraryfolders" }
|
||||
}
|
||||
|
||||
1 -> {
|
||||
// start of a library node
|
||||
}
|
||||
|
||||
2 -> {
|
||||
// in a library node
|
||||
if (key == "path") {
|
||||
currentLibraryPath = Path(value)
|
||||
} else if (key == "apps") {
|
||||
// start of apps node
|
||||
require(currentLibraryPath != null) { "path must come before apps in node" }
|
||||
}
|
||||
}
|
||||
|
||||
3 -> {
|
||||
// in apps node
|
||||
val curAppId = try {
|
||||
key.toInt()
|
||||
} catch (_: NumberFormatException) {
|
||||
null
|
||||
}
|
||||
if (curAppId != null && curAppId == appId) {
|
||||
assert(currentLibraryPath != null)
|
||||
return currentLibraryPath
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LogManager.warning("[VRChatRegEdit] Couldn't find library folder for appid $appId")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LogManager.severe("[VRChatRegEdit] Error parsing Steam libraryfolders", e)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
const val USER_REG_SUBPATH = "steamapps/compatdata/438100/pfx/user.reg"
|
||||
val STEAM_PATH = System.getenv("HOME")?.let { home ->
|
||||
Path(home, ".steam", "root").takeIf { it.exists() }
|
||||
?: Path(home, ".steam", "debian-installation").takeIf { it.exists() }
|
||||
?: Path(home, ".var", "app", "com.valvesoftware.Steam", "data", "Steam").takeIf { it.exists() }
|
||||
}
|
||||
val USER_REG_PATH: Path? = if (STEAM_PATH != null) findAppLibraryLocation(STEAM_PATH, 438100)?.resolve(USER_REG_SUBPATH) else null
|
||||
|
||||
val KEY_VALUE_PATTERN = Regex(""""(.+)"=(.+)""")
|
||||
|
||||
val HEX_FORMAT = HexFormat {
|
||||
upperCase = false
|
||||
|
||||
@@ -3,31 +3,14 @@ package dev.slimevr.desktop.install.drivers
|
||||
import io.eiren.util.logging.LogManager
|
||||
import java.io.IOException
|
||||
|
||||
fun executeShellCommand(vararg command: String): Pair<Int, String>? = try {
|
||||
fun executeShellCommand(vararg command: String): String? = try {
|
||||
val process = ProcessBuilder(*command)
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
|
||||
process.waitFor()
|
||||
Pair(process.exitValue(), process.inputStream.bufferedReader().readText())
|
||||
process.inputStream.bufferedReader().readText().also {
|
||||
process.waitFor()
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
LogManager.warning("Error executing shell command", e)
|
||||
null
|
||||
}
|
||||
|
||||
// vrpathreg returns 1 if the driver is present
|
||||
fun shouldInstallDriver(exitCode: Int): Boolean = exitCode == 1
|
||||
|
||||
// get a descriptive reason why we're skipping driver installation
|
||||
// Exit codes from vrpathreg output:
|
||||
// 0 : Success
|
||||
// 1 : ( finddriver only ) Driver not present
|
||||
// 2 : ( finddriver only ) Error, driver installed more than once
|
||||
// -1 : Configuration or permission problem
|
||||
// -2 : Argument problem
|
||||
fun getDriverInstallSkipReason(exitCode: Int): String = when (exitCode) {
|
||||
0 -> "driver already installed"
|
||||
2 -> "driver installed more than once"
|
||||
-1 -> "SteamVR is misconfigured"
|
||||
else -> "unknown reason ($exitCode)"
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
package dev.slimevr.desktop.install.drivers
|
||||
|
||||
import dev.slimevr.desktop.platform.linux.SteamUtils
|
||||
import dev.slimevr.desktop.featureFlags
|
||||
import io.eiren.util.logging.LogManager
|
||||
|
||||
class Linux {
|
||||
|
||||
val path: String = System.getProperty("user.dir")
|
||||
|
||||
fun updateLinux() {
|
||||
@@ -11,29 +12,21 @@ class Linux {
|
||||
}
|
||||
|
||||
fun updateLinuxSteamVRDriver() {
|
||||
val steamVRLocation = SteamUtils.findAppLibraryLocation(250820)?.resolve("steamapps/common/SteamVR") ?: run {
|
||||
LogManager.warning("SteamVR driver installation failed: couldn't find SteamVR")
|
||||
val pathRegPath = "${System.getProperty("user.home")}/.steam/steam/steamapps/common/SteamVR/bin/vrpathreg.sh"
|
||||
val vrPathRegContents = executeShellCommand(pathRegPath)
|
||||
if (vrPathRegContents == null) {
|
||||
LogManager.warning("SteamVR driver installation failed")
|
||||
return
|
||||
}
|
||||
if (vrPathRegContents.contains("slimevr")) {
|
||||
LogManager.info("SteamVR driver is already installed")
|
||||
return
|
||||
}
|
||||
|
||||
val pathRegPath = "$steamVRLocation/bin/vrpathreg.sh"
|
||||
val (findExitCode, _) = executeShellCommand(pathRegPath, "finddriver", "slimevr") ?: run {
|
||||
LogManager.warning("SteamVR driver installation failed: couldn't run vrpathreg finddriver")
|
||||
return
|
||||
}
|
||||
executeShellCommand(pathRegPath, "adddriver", "$path/$LINUX_STEAM_DRIVER_DIRECTORY")
|
||||
|
||||
if (!shouldInstallDriver(findExitCode)) {
|
||||
LogManager.info("Skipping SteamVR driver installation: ${getDriverInstallSkipReason(findExitCode)}")
|
||||
return
|
||||
}
|
||||
|
||||
val (addExitCode, _) = executeShellCommand(pathRegPath, "adddriver", "$path/$LINUX_STEAM_DRIVER_DIRECTORY") ?: run {
|
||||
LogManager.warning("SteamVR driver installation failed: couldn't run vrpathreg adddriver")
|
||||
return
|
||||
}
|
||||
|
||||
if (addExitCode != 0) {
|
||||
LogManager.warning("SteamVR driver installation failed: vrpathreg exited with code $addExitCode")
|
||||
if (executeShellCommand(pathRegPath)?.contains("slimevr") != true) {
|
||||
LogManager.warning("Failed to install SteamVR driver")
|
||||
return
|
||||
}
|
||||
LogManager.info("SteamVR driver successfully installed")
|
||||
|
||||
@@ -3,10 +3,9 @@ package dev.slimevr.desktop.install.drivers
|
||||
import com.sun.jna.platform.win32.WinReg
|
||||
import dev.slimevr.desktop.games.vrchat.RegEditWindows
|
||||
import io.eiren.util.logging.LogManager
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
class Windows {
|
||||
|
||||
val path: String = System.getProperty("user.dir")
|
||||
|
||||
fun updateWindows() {
|
||||
@@ -15,36 +14,28 @@ class Windows {
|
||||
|
||||
fun steamVRDriver() {
|
||||
val regEdit = RegEditWindows()
|
||||
val steamVRLocation = regEdit.getKeyByPath(WinReg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 250820")["InstallLocation"]
|
||||
if (steamVRLocation == null || !steamVRLocation.endsWith("SteamVR")) {
|
||||
LogManager.warning("SteamVR driver installation failed: couldn't find SteamVR")
|
||||
val regQuery = regEdit.getKeyByPath(WinReg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 250820")
|
||||
val steamVRLocation = regQuery["InstallLocation"]
|
||||
if (steamVRLocation == null || !steamVRLocation.contains("SteamVR")) {
|
||||
LogManager.warning("Can't find SteamVR, unable to install SteamVR driver")
|
||||
return
|
||||
}
|
||||
|
||||
if (Path(steamVRLocation, "drivers", "slimevr").exists()) {
|
||||
LogManager.warning("Skipping SteamVR driver installation: driver is in SteamVR drivers folder")
|
||||
LogManager.warning("If you would like the SteamVR driver to automatically update, please uninstall the other version of SlimeVR")
|
||||
val pathRegPath = "${steamVRLocation}\\bin\\win64\\vrpathreg.exe"
|
||||
val vrPathRegContents = executeShellCommand(pathRegPath, "finddriver", "slimevr")
|
||||
if (vrPathRegContents == null) {
|
||||
LogManager.warning("Error installing SteamVR driver")
|
||||
return
|
||||
}
|
||||
if (vrPathRegContents.contains("slimevr")) {
|
||||
LogManager.info("SteamVR driver is already installed")
|
||||
return
|
||||
}
|
||||
|
||||
val pathRegPath = "$steamVRLocation\\bin\\win64\\vrpathreg.exe"
|
||||
val (findExitCode, _) = executeShellCommand(pathRegPath, "finddriver", "slimevr") ?: run {
|
||||
LogManager.warning("SteamVR driver installation failed: couldn't run vrpathreg finddriver")
|
||||
return
|
||||
}
|
||||
executeShellCommand(pathRegPath, "adddriver", "${path}\\${WINDOWS_STEAMVR_DRIVER_DIRECTORY}")
|
||||
|
||||
if (!shouldInstallDriver(findExitCode)) {
|
||||
LogManager.info("Skipping SteamVR driver installation: ${getDriverInstallSkipReason(findExitCode)}")
|
||||
return
|
||||
}
|
||||
|
||||
val (addExitCode, _) = executeShellCommand(pathRegPath, "adddriver", "$path\\$WINDOWS_STEAMVR_DRIVER_DIRECTORY") ?: run {
|
||||
LogManager.warning("SteamVR driver installation failed: couldn't run vrpathreg adddriver")
|
||||
return
|
||||
}
|
||||
|
||||
if (addExitCode != 0) {
|
||||
LogManager.warning("SteamVR driver installation failed: vrpathreg exited with code $addExitCode")
|
||||
if (executeShellCommand(pathRegPath, "finddriver", "slimevr")?.contains("slimevr") != true) {
|
||||
LogManager.warning("Failed to install SlimeVR driver")
|
||||
return
|
||||
}
|
||||
LogManager.info("SteamVR driver successfully installed")
|
||||
|
||||
@@ -82,7 +82,6 @@ abstract class ProtobufBridge(@JvmField protected val bridgeName: String) : ISte
|
||||
target.position = source.position
|
||||
target.setRotation(source.getRotation())
|
||||
target.status = source.status
|
||||
target.setVelocity(source.getVelocity())
|
||||
target.batteryLevel = source.batteryLevel
|
||||
target.batteryVoltage = source.batteryVoltage
|
||||
target.dataTick()
|
||||
@@ -103,17 +102,16 @@ abstract class ProtobufBridge(@JvmField protected val bridgeName: String) : ISte
|
||||
}
|
||||
|
||||
@VRServerThread
|
||||
protected fun writeTrackerUpdate(localTracker: Tracker) {
|
||||
val builder = ProtobufMessages.Position.newBuilder()
|
||||
.setTrackerId(localTracker.id)
|
||||
|
||||
protected fun writeTrackerUpdate(localTracker: Tracker?) {
|
||||
val builder = ProtobufMessages.Position.newBuilder().setTrackerId(
|
||||
localTracker!!.id,
|
||||
)
|
||||
if (localTracker.hasPosition) {
|
||||
val pos = localTracker.position
|
||||
builder.setX(pos.x)
|
||||
builder.setY(pos.y)
|
||||
builder.setZ(pos.z)
|
||||
}
|
||||
|
||||
if (localTracker.hasRotation) {
|
||||
val rot = localTracker.getRotation()
|
||||
builder.setQx(rot.x)
|
||||
@@ -121,19 +119,7 @@ abstract class ProtobufBridge(@JvmField protected val bridgeName: String) : ISte
|
||||
builder.setQz(rot.z)
|
||||
builder.setQw(rot.w)
|
||||
}
|
||||
|
||||
if (localTracker.hasVelocity) {
|
||||
val vel = localTracker.getVelocity()
|
||||
builder.setVx(vel.x)
|
||||
builder.setVy(vel.y)
|
||||
builder.setVz(vel.z)
|
||||
}
|
||||
|
||||
sendMessage(
|
||||
ProtobufMessage.newBuilder()
|
||||
.setPosition(builder)
|
||||
.build(),
|
||||
)
|
||||
sendMessage(ProtobufMessage.newBuilder().setPosition(builder).build())
|
||||
}
|
||||
|
||||
@VRServerThread
|
||||
@@ -183,16 +169,6 @@ abstract class ProtobufBridge(@JvmField protected val bridgeName: String) : ISte
|
||||
),
|
||||
|
||||
)
|
||||
if (positionMessage.hasVx()) {
|
||||
tracker
|
||||
.setVelocity(
|
||||
Vector3(
|
||||
positionMessage.vx,
|
||||
positionMessage.vy,
|
||||
positionMessage.vz,
|
||||
),
|
||||
)
|
||||
}
|
||||
tracker.dataTick()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1052,48 +1052,6 @@ public final class ProtobufMessages {
|
||||
* @return The dataSource.
|
||||
*/
|
||||
dev.slimevr.desktop.platform.ProtobufMessages.Position.DataSource getDataSource();
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return Whether the vx field is set.
|
||||
*/
|
||||
boolean hasVx();
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return The vx.
|
||||
*/
|
||||
float getVx();
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return Whether the vy field is set.
|
||||
*/
|
||||
boolean hasVy();
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return The vy.
|
||||
*/
|
||||
float getVy();
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return Whether the vz field is set.
|
||||
*/
|
||||
boolean hasVz();
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return The vz.
|
||||
*/
|
||||
float getVz();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1458,75 +1416,6 @@ public final class ProtobufMessages {
|
||||
: result;
|
||||
}
|
||||
|
||||
public static final int VX_FIELD_NUMBER = 10;
|
||||
private float vx_ = 0F;
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return Whether the vx field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasVx() {
|
||||
return ((bitField0_ & 0x00000010) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return The vx.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public float getVx() {
|
||||
return vx_;
|
||||
}
|
||||
|
||||
public static final int VY_FIELD_NUMBER = 11;
|
||||
private float vy_ = 0F;
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return Whether the vy field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasVy() {
|
||||
return ((bitField0_ & 0x00000020) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return The vy.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public float getVy() {
|
||||
return vy_;
|
||||
}
|
||||
|
||||
public static final int VZ_FIELD_NUMBER = 12;
|
||||
private float vz_ = 0F;
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return Whether the vz field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasVz() {
|
||||
return ((bitField0_ & 0x00000040) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return The vz.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public float getVz() {
|
||||
return vz_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
|
||||
@java.lang.Override
|
||||
@@ -1571,15 +1460,6 @@ public final class ProtobufMessages {
|
||||
if (((bitField0_ & 0x00000008) != 0)) {
|
||||
output.writeEnum(9, dataSource_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000010) != 0)) {
|
||||
output.writeFloat(10, vx_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000020) != 0)) {
|
||||
output.writeFloat(11, vy_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000040) != 0)) {
|
||||
output.writeFloat(12, vz_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@@ -1626,18 +1506,6 @@ public final class ProtobufMessages {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeEnumSize(9, dataSource_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000010) != 0)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeFloatSize(10, vx_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000020) != 0)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeFloatSize(11, vy_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000040) != 0)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeFloatSize(12, vz_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
@@ -1732,42 +1600,6 @@ public final class ProtobufMessages {
|
||||
if (dataSource_ != other.dataSource_)
|
||||
return false;
|
||||
}
|
||||
if (hasVx() != other.hasVx())
|
||||
return false;
|
||||
if (hasVx()) {
|
||||
if (
|
||||
java.lang.Float.floatToIntBits(getVx())
|
||||
!= java.lang.Float
|
||||
.floatToIntBits(
|
||||
other.getVx()
|
||||
)
|
||||
)
|
||||
return false;
|
||||
}
|
||||
if (hasVy() != other.hasVy())
|
||||
return false;
|
||||
if (hasVy()) {
|
||||
if (
|
||||
java.lang.Float.floatToIntBits(getVy())
|
||||
!= java.lang.Float
|
||||
.floatToIntBits(
|
||||
other.getVy()
|
||||
)
|
||||
)
|
||||
return false;
|
||||
}
|
||||
if (hasVz() != other.hasVz())
|
||||
return false;
|
||||
if (hasVz()) {
|
||||
if (
|
||||
java.lang.Float.floatToIntBits(getVz())
|
||||
!= java.lang.Float
|
||||
.floatToIntBits(
|
||||
other.getVz()
|
||||
)
|
||||
)
|
||||
return false;
|
||||
}
|
||||
if (!getUnknownFields().equals(other.getUnknownFields()))
|
||||
return false;
|
||||
return true;
|
||||
@@ -1834,30 +1666,6 @@ public final class ProtobufMessages {
|
||||
hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + dataSource_;
|
||||
}
|
||||
if (hasVx()) {
|
||||
hash = (37 * hash) + VX_FIELD_NUMBER;
|
||||
hash = (53 * hash)
|
||||
+ java.lang.Float
|
||||
.floatToIntBits(
|
||||
getVx()
|
||||
);
|
||||
}
|
||||
if (hasVy()) {
|
||||
hash = (37 * hash) + VY_FIELD_NUMBER;
|
||||
hash = (53 * hash)
|
||||
+ java.lang.Float
|
||||
.floatToIntBits(
|
||||
getVy()
|
||||
);
|
||||
}
|
||||
if (hasVz()) {
|
||||
hash = (37 * hash) + VZ_FIELD_NUMBER;
|
||||
hash = (53 * hash)
|
||||
+ java.lang.Float
|
||||
.floatToIntBits(
|
||||
getVz()
|
||||
);
|
||||
}
|
||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
@@ -2033,9 +1841,6 @@ public final class ProtobufMessages {
|
||||
qz_ = 0F;
|
||||
qw_ = 0F;
|
||||
dataSource_ = 0;
|
||||
vx_ = 0F;
|
||||
vy_ = 0F;
|
||||
vz_ = 0F;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -2106,18 +1911,6 @@ public final class ProtobufMessages {
|
||||
result.dataSource_ = dataSource_;
|
||||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000200) != 0)) {
|
||||
result.vx_ = vx_;
|
||||
to_bitField0_ |= 0x00000010;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000400) != 0)) {
|
||||
result.vy_ = vy_;
|
||||
to_bitField0_ |= 0x00000020;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000800) != 0)) {
|
||||
result.vz_ = vz_;
|
||||
to_bitField0_ |= 0x00000040;
|
||||
}
|
||||
result.bitField0_ |= to_bitField0_;
|
||||
}
|
||||
|
||||
@@ -2167,15 +1960,6 @@ public final class ProtobufMessages {
|
||||
if (other.hasDataSource()) {
|
||||
setDataSourceValue(other.getDataSourceValue());
|
||||
}
|
||||
if (other.hasVx()) {
|
||||
setVx(other.getVx());
|
||||
}
|
||||
if (other.hasVy()) {
|
||||
setVy(other.getVy());
|
||||
}
|
||||
if (other.hasVz()) {
|
||||
setVz(other.getVz());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
onChanged();
|
||||
return this;
|
||||
@@ -2248,21 +2032,6 @@ public final class ProtobufMessages {
|
||||
bitField0_ |= 0x00000100;
|
||||
break;
|
||||
} // case 72
|
||||
case 85: {
|
||||
vx_ = input.readFloat();
|
||||
bitField0_ |= 0x00000200;
|
||||
break;
|
||||
} // case 85
|
||||
case 93: {
|
||||
vy_ = input.readFloat();
|
||||
bitField0_ |= 0x00000400;
|
||||
break;
|
||||
} // case 93
|
||||
case 101: {
|
||||
vz_ = input.readFloat();
|
||||
bitField0_ |= 0x00000800;
|
||||
break;
|
||||
} // case 101
|
||||
default: {
|
||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||
done = true; // was an endgroup tag
|
||||
@@ -2695,150 +2464,6 @@ public final class ProtobufMessages {
|
||||
return this;
|
||||
}
|
||||
|
||||
private float vx_;
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return Whether the vx field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasVx() {
|
||||
return ((bitField0_ & 0x00000200) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return The vx.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public float getVx() {
|
||||
return vx_;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @param value The vx to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setVx(float value) {
|
||||
|
||||
vx_ = value;
|
||||
bitField0_ |= 0x00000200;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vx = 10;</code>
|
||||
*
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearVx() {
|
||||
bitField0_ = (bitField0_ & ~0x00000200);
|
||||
vx_ = 0F;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private float vy_;
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return Whether the vy field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasVy() {
|
||||
return ((bitField0_ & 0x00000400) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return The vy.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public float getVy() {
|
||||
return vy_;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @param value The vy to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setVy(float value) {
|
||||
|
||||
vy_ = value;
|
||||
bitField0_ |= 0x00000400;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vy = 11;</code>
|
||||
*
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearVy() {
|
||||
bitField0_ = (bitField0_ & ~0x00000400);
|
||||
vy_ = 0F;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private float vz_;
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return Whether the vz field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasVz() {
|
||||
return ((bitField0_ & 0x00000800) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return The vz.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public float getVz() {
|
||||
return vz_;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @param value The vz to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setVz(float value) {
|
||||
|
||||
vz_ = value;
|
||||
bitField0_ |= 0x00000800;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional float vz = 12;</code>
|
||||
*
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearVz() {
|
||||
bitField0_ = (bitField0_ & ~0x00000800);
|
||||
vz_ = 0F;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:messages.Position)
|
||||
}
|
||||
|
||||
@@ -9398,7 +9023,7 @@ public final class ProtobufMessages {
|
||||
+
|
||||
"ngPong\"#\n\007Version\022\030\n\020protocol_version\030\001 "
|
||||
+
|
||||
"\001(\005\"\333\002\n\010Position\022\022\n\ntracker_id\030\001 \001(\005\022\016\n\001"
|
||||
"\001(\005\"\223\002\n\010Position\022\022\n\ntracker_id\030\001 \001(\005\022\016\n\001"
|
||||
+
|
||||
"x\030\002 \001(\002H\000\210\001\001\022\016\n\001y\030\003 \001(\002H\001\210\001\001\022\016\n\001z\030\004 \001(\002H"
|
||||
+
|
||||
@@ -9406,71 +9031,67 @@ public final class ProtobufMessages {
|
||||
+
|
||||
"\022\n\n\002qw\030\010 \001(\002\0227\n\013data_source\030\t \001(\0162\035.mess"
|
||||
+
|
||||
"ages.Position.DataSourceH\003\210\001\001\022\017\n\002vx\030\n \001("
|
||||
"ages.Position.DataSourceH\003\210\001\001\"8\n\nDataSou"
|
||||
+
|
||||
"\002H\004\210\001\001\022\017\n\002vy\030\013 \001(\002H\005\210\001\001\022\017\n\002vz\030\014 \001(\002H\006\210\001\001"
|
||||
"rce\022\010\n\004NONE\020\000\022\007\n\003IMU\020\001\022\r\n\tPRECISION\020\002\022\010\n"
|
||||
+
|
||||
"\"8\n\nDataSource\022\010\n\004NONE\020\000\022\007\n\003IMU\020\001\022\r\n\tPRE"
|
||||
"\004FULL\020\003B\004\n\002_xB\004\n\002_yB\004\n\002_zB\016\n\014_data_sourc"
|
||||
+
|
||||
"CISION\020\002\022\010\n\004FULL\020\003B\004\n\002_xB\004\n\002_yB\004\n\002_zB\016\n\014"
|
||||
"e\"\227\001\n\nUserAction\022\014\n\004name\030\001 \001(\t\022C\n\020action"
|
||||
+
|
||||
"_data_sourceB\005\n\003_vxB\005\n\003_vyB\005\n\003_vz\"\227\001\n\nUs"
|
||||
"_arguments\030\002 \003(\0132).messages.UserAction.A"
|
||||
+
|
||||
"erAction\022\014\n\004name\030\001 \001(\t\022C\n\020action_argumen"
|
||||
"ctionArgumentsEntry\0326\n\024ActionArgumentsEn"
|
||||
+
|
||||
"ts\030\002 \003(\0132).messages.UserAction.ActionArg"
|
||||
"try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"|\n\014T"
|
||||
+
|
||||
"umentsEntry\0326\n\024ActionArgumentsEntry\022\013\n\003k"
|
||||
"rackerAdded\022\022\n\ntracker_id\030\001 \001(\005\022\026\n\016track"
|
||||
+
|
||||
"ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"|\n\014TrackerAd"
|
||||
"er_serial\030\002 \001(\t\022\024\n\014tracker_name\030\003 \001(\t\022\024\n"
|
||||
+
|
||||
"ded\022\022\n\ntracker_id\030\001 \001(\005\022\026\n\016tracker_seria"
|
||||
"\014tracker_role\030\004 \001(\005\022\024\n\014manufacturer\030\005 \001("
|
||||
+
|
||||
"l\030\002 \001(\t\022\024\n\014tracker_name\030\003 \001(\t\022\024\n\014tracker"
|
||||
"\t\"\374\002\n\rTrackerStatus\022\022\n\ntracker_id\030\001 \001(\005\022"
|
||||
+
|
||||
"_role\030\004 \001(\005\022\024\n\014manufacturer\030\005 \001(\t\"\374\002\n\rTr"
|
||||
".\n\006status\030\002 \001(\0162\036.messages.TrackerStatus"
|
||||
+
|
||||
"ackerStatus\022\022\n\ntracker_id\030\001 \001(\005\022.\n\006statu"
|
||||
".Status\0221\n\005extra\030\003 \003(\0132\".messages.Tracke"
|
||||
+
|
||||
"s\030\002 \001(\0162\036.messages.TrackerStatus.Status\022"
|
||||
"rStatus.ExtraEntry\022;\n\nconfidence\030\004 \001(\0162\""
|
||||
+
|
||||
"1\n\005extra\030\003 \003(\0132\".messages.TrackerStatus."
|
||||
".messages.TrackerStatus.ConfidenceH\000\210\001\001\032"
|
||||
+
|
||||
"ExtraEntry\022;\n\nconfidence\030\004 \001(\0162\".message"
|
||||
",\n\nExtraEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001("
|
||||
+
|
||||
"s.TrackerStatus.ConfidenceH\000\210\001\001\032,\n\nExtra"
|
||||
"\t:\0028\001\"E\n\006Status\022\020\n\014DISCONNECTED\020\000\022\006\n\002OK\020"
|
||||
+
|
||||
"Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"E\n"
|
||||
"\001\022\010\n\004BUSY\020\002\022\t\n\005ERROR\020\003\022\014\n\010OCCLUDED\020\004\"3\n\n"
|
||||
+
|
||||
"\006Status\022\020\n\014DISCONNECTED\020\000\022\006\n\002OK\020\001\022\010\n\004BUS"
|
||||
"Confidence\022\006\n\002NO\020\000\022\007\n\003LOW\020\001\022\n\n\006MEDIUM\020\005\022"
|
||||
+
|
||||
"Y\020\002\022\t\n\005ERROR\020\003\022\014\n\010OCCLUDED\020\004\"3\n\nConfiden"
|
||||
"\010\n\004HIGH\020\nB\r\n\013_confidence\"I\n\007Battery\022\022\n\nt"
|
||||
+
|
||||
"ce\022\006\n\002NO\020\000\022\007\n\003LOW\020\001\022\n\n\006MEDIUM\020\005\022\010\n\004HIGH\020"
|
||||
"racker_id\030\001 \001(\005\022\025\n\rbattery_level\030\002 \001(\002\022\023"
|
||||
+
|
||||
"\nB\r\n\013_confidence\"I\n\007Battery\022\022\n\ntracker_i"
|
||||
"\n\013is_charging\030\003 \001(\010\"\241\002\n\017ProtobufMessage\022"
|
||||
+
|
||||
"d\030\001 \001(\005\022\025\n\rbattery_level\030\002 \001(\002\022\023\n\013is_cha"
|
||||
"&\n\010position\030\001 \001(\0132\022.messages.PositionH\000\022"
|
||||
+
|
||||
"rging\030\003 \001(\010\"\241\002\n\017ProtobufMessage\022&\n\010posit"
|
||||
"+\n\013user_action\030\002 \001(\0132\024.messages.UserActi"
|
||||
+
|
||||
"ion\030\001 \001(\0132\022.messages.PositionH\000\022+\n\013user_"
|
||||
"onH\000\022/\n\rtracker_added\030\003 \001(\0132\026.messages.T"
|
||||
+
|
||||
"action\030\002 \001(\0132\024.messages.UserActionH\000\022/\n\r"
|
||||
"rackerAddedH\000\0221\n\016tracker_status\030\004 \001(\0132\027."
|
||||
+
|
||||
"tracker_added\030\003 \001(\0132\026.messages.TrackerAd"
|
||||
"messages.TrackerStatusH\000\022$\n\007battery\030\005 \001("
|
||||
+
|
||||
"dedH\000\0221\n\016tracker_status\030\004 \001(\0132\027.messages"
|
||||
"\0132\021.messages.BatteryH\000\022$\n\007version\030\006 \001(\0132"
|
||||
+
|
||||
".TrackerStatusH\000\022$\n\007battery\030\005 \001(\0132\021.mess"
|
||||
"\021.messages.VersionH\000B\t\n\007messageB2\n\034dev.s"
|
||||
+
|
||||
"ages.BatteryH\000\022$\n\007version\030\006 \001(\0132\021.messag"
|
||||
"limevr.desktop.platformB\020ProtobufMessage"
|
||||
+
|
||||
"es.VersionH\000B\t\n\007messageB2\n\034dev.slimevr.d"
|
||||
+
|
||||
"esktop.platformB\020ProtobufMessagesH\003b\006pro"
|
||||
+
|
||||
"to3"
|
||||
"sH\003b\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(
|
||||
@@ -9492,7 +9113,7 @@ public final class ProtobufMessages {
|
||||
internal_static_messages_Position_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_messages_Position_descriptor,
|
||||
new java.lang.String[] { "TrackerId", "X", "Y", "Z", "Qx", "Qy", "Qz", "Qw",
|
||||
"DataSource", "Vx", "Vy", "Vz", }
|
||||
"DataSource", }
|
||||
);
|
||||
internal_static_messages_UserAction_descriptor = getDescriptor().getMessageTypes().get(3);
|
||||
internal_static_messages_UserAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
|
||||
@@ -8,7 +8,6 @@ import dev.slimevr.bridge.ISteamVRBridge
|
||||
import dev.slimevr.config.BridgeConfig
|
||||
import dev.slimevr.desktop.platform.ProtobufMessages.*
|
||||
import dev.slimevr.protocol.rpc.settings.RPCSettingsHandler
|
||||
import dev.slimevr.tracking.trackers.DeviceOrigin
|
||||
import dev.slimevr.tracking.trackers.Tracker
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition
|
||||
import dev.slimevr.tracking.trackers.TrackerPosition.Companion.getByTrackerRole
|
||||
@@ -141,33 +140,61 @@ abstract class SteamVRBridge(
|
||||
if (!config.automaticSharedTrackersToggling || server.getPauseTracking()) return false
|
||||
|
||||
val skeleton = instance.humanPoseManager.skeleton
|
||||
// Hands aren't touched as they will override the controller's tracking
|
||||
val roleToTrackers = mapOf(
|
||||
TrackerRole.CHEST to setOf(skeleton.upperChestTracker, skeleton.chestTracker),
|
||||
TrackerRole.LEFT_ELBOW to setOf(skeleton.leftUpperArmTracker),
|
||||
TrackerRole.RIGHT_ELBOW to setOf(skeleton.rightUpperArmTracker),
|
||||
TrackerRole.WAIST to setOf(skeleton.waistTracker, skeleton.hipTracker),
|
||||
TrackerRole.LEFT_KNEE to setOf(skeleton.leftUpperLegTracker),
|
||||
TrackerRole.RIGHT_KNEE to setOf(skeleton.rightUpperLegTracker),
|
||||
TrackerRole.LEFT_FOOT to setOf(skeleton.leftLowerLegTracker, skeleton.leftFootTracker),
|
||||
TrackerRole.RIGHT_FOOT to setOf(skeleton.rightLowerLegTracker, skeleton.rightFootTracker),
|
||||
val isWaistSteamVr = skeleton.hipTracker?.device?.isOpenVrDevice == true ||
|
||||
skeleton.waistTracker?.device?.isOpenVrDevice == true
|
||||
// Enable waist if skeleton has an spine tracker
|
||||
changeShareSettings(TrackerRole.WAIST, skeleton.hasSpineTracker && !isWaistSteamVr)
|
||||
|
||||
// hasChest if waist and/or hip is on, and chest and/or upper chest is also on
|
||||
val hasChest = skeleton.upperChestTracker != null || skeleton.chestTracker != null
|
||||
val isChestSteamVr = skeleton.upperChestTracker?.device?.isOpenVrDevice == true ||
|
||||
skeleton.chestTracker?.device?.isOpenVrDevice == true
|
||||
changeShareSettings(
|
||||
TrackerRole.CHEST,
|
||||
hasChest && !isChestSteamVr,
|
||||
)
|
||||
|
||||
for ((role, trackers) in roleToTrackers) {
|
||||
val shouldShare = if (role == TrackerRole.WAIST) {
|
||||
// Waist is special, it should be enabled if there is any tracker on the spine,
|
||||
// but ignored if the waist or hip tracker is from us
|
||||
skeleton.hasSpineTracker &&
|
||||
!trackers.any {
|
||||
it?.device?.origin == DeviceOrigin.STEAMVR
|
||||
}
|
||||
} else {
|
||||
trackers.any {
|
||||
it != null && it.device?.origin != DeviceOrigin.STEAMVR
|
||||
}
|
||||
}
|
||||
changeShareSettings(role, shouldShare)
|
||||
}
|
||||
// hasFeet if lower and/or upper leg tracker is on
|
||||
val hasLeftFoot =
|
||||
(skeleton.leftUpperLegTracker != null || skeleton.leftLowerLegTracker != null)
|
||||
val isLeftFootSteamVr =
|
||||
skeleton.leftLowerLegTracker?.device?.isOpenVrDevice == true ||
|
||||
skeleton.leftFootTracker?.device?.isOpenVrDevice == true
|
||||
|
||||
val hasRightFoot =
|
||||
(skeleton.rightUpperLegTracker != null || skeleton.rightLowerLegTracker != null)
|
||||
val isRightFootSteamVr =
|
||||
skeleton.rightLowerLegTracker?.device?.isOpenVrDevice == true ||
|
||||
skeleton.rightFootTracker?.device?.isOpenVrDevice == true
|
||||
changeShareSettings(
|
||||
TrackerRole.LEFT_FOOT,
|
||||
hasLeftFoot && !isLeftFootSteamVr,
|
||||
)
|
||||
changeShareSettings(
|
||||
TrackerRole.RIGHT_FOOT,
|
||||
hasRightFoot && !isRightFootSteamVr,
|
||||
)
|
||||
|
||||
// hasKnees is just hasFeet
|
||||
val isLeftKneeSteamVr = skeleton.leftUpperLegTracker?.device?.isOpenVrDevice == true
|
||||
|
||||
val isRightKneeSteamVr = skeleton.rightUpperLegTracker?.device?.isOpenVrDevice == true
|
||||
changeShareSettings(TrackerRole.LEFT_KNEE, hasLeftFoot && !isLeftKneeSteamVr)
|
||||
changeShareSettings(TrackerRole.RIGHT_KNEE, hasRightFoot && !isRightKneeSteamVr)
|
||||
|
||||
// hasElbows if an upper arm or a lower arm tracker is on
|
||||
val hasLeftElbow = skeleton.hasLeftArmTracker
|
||||
val isLeftElbowSteamVr = skeleton.leftUpperArmTracker?.device?.isOpenVrDevice == true ||
|
||||
skeleton.leftLowerArmTracker?.device?.isOpenVrDevice == true
|
||||
|
||||
val hasRightElbow = skeleton.hasRightArmTracker
|
||||
val isRightElbowSteamVr = skeleton.rightUpperArmTracker?.device?.isOpenVrDevice == true ||
|
||||
skeleton.rightLowerArmTracker?.device?.isOpenVrDevice == true
|
||||
changeShareSettings(TrackerRole.LEFT_ELBOW, hasLeftElbow && !isLeftElbowSteamVr)
|
||||
changeShareSettings(TrackerRole.RIGHT_ELBOW, hasRightElbow && !isRightElbowSteamVr)
|
||||
|
||||
// Hands aren't touched as they will override the controller's tracking
|
||||
// Return true to say that trackers were successfully toggled automatically
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -201,7 +228,6 @@ abstract class SteamVRBridge(
|
||||
override fun createNewTracker(trackerAdded: TrackerAdded): Tracker {
|
||||
val device = instance.deviceManager
|
||||
.createDevice(
|
||||
DeviceOrigin.STEAMVR,
|
||||
trackerAdded.trackerName,
|
||||
null,
|
||||
trackerAdded.manufacturer.ifEmpty { "OpenVR" },
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
package dev.slimevr.desktop.platform.linux
|
||||
|
||||
import io.eiren.util.logging.LogManager
|
||||
import java.io.BufferedReader
|
||||
import java.io.FileReader
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
class SteamUtils {
|
||||
companion object {
|
||||
val STEAM_PATH = System.getenv("HOME")?.let { home ->
|
||||
Path(home, ".steam", "root").takeIf { it.exists() }
|
||||
?: Path(home, ".steam", "debian-installation").takeIf { it.exists() }
|
||||
?: Path(home, ".var", "app", "com.valvesoftware.Steam", "data", "Steam").takeIf { it.exists() }
|
||||
}
|
||||
val VDF_KEY_VALUES_PATTERN = Regex(""""(\w+)"[ \t]*(?:"(.+)")?""")
|
||||
|
||||
fun findAppLibraryLocation(appId: Int): Path? {
|
||||
if (STEAM_PATH == null) return null
|
||||
|
||||
try {
|
||||
BufferedReader(FileReader(STEAM_PATH.resolve("config/libraryfolders.vdf").toFile())).use { reader ->
|
||||
var depth = 0
|
||||
var currentLibraryPath: Path? = null
|
||||
|
||||
while (reader.ready()) {
|
||||
val line = reader.readLine().trim()
|
||||
if (line == "{") {
|
||||
depth += 1
|
||||
continue
|
||||
}
|
||||
if (line == "}") {
|
||||
depth -= 1
|
||||
continue
|
||||
}
|
||||
|
||||
VDF_KEY_VALUES_PATTERN.matchEntire(line)?.let {
|
||||
val key = it.groupValues[1]
|
||||
val value = it.groupValues[2]
|
||||
|
||||
when (depth) {
|
||||
0 -> {
|
||||
require(key == "libraryfolders") { "root key must be libraryfolders" }
|
||||
}
|
||||
|
||||
1 -> {
|
||||
// start of a library node
|
||||
}
|
||||
|
||||
2 -> {
|
||||
// in a library node
|
||||
if (key == "path") {
|
||||
currentLibraryPath = Path(value)
|
||||
} else if (key == "apps") {
|
||||
// start of apps node
|
||||
require(currentLibraryPath != null) { "path must come before apps in node" }
|
||||
}
|
||||
}
|
||||
|
||||
3 -> {
|
||||
// in apps node
|
||||
val curAppId = try {
|
||||
key.toInt()
|
||||
} catch (_: NumberFormatException) {
|
||||
null
|
||||
}
|
||||
if (curAppId != null && curAppId == appId) {
|
||||
check(currentLibraryPath != null) { "path must come before apps in node" }
|
||||
return currentLibraryPath
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LogManager.warning("[RegEdit] Couldn't find library folder for appid $appId")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LogManager.severe("[RegEdit] Error parsing Steam libraryfolders", e)
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
Submodule solarxr-protocol updated: 3ffd218a83...5d572629c9.
Reference in new issue
Block a user