mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-23 18:41:24 -08:00
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83941fd38e | ||
|
|
64a2484827 | ||
|
|
d75417de49 | ||
|
|
51aa13b6c8 | ||
|
|
7c202618b3 | ||
|
|
e3be80fadc | ||
|
|
49d631a2a7 | ||
|
|
0efb1ca808 | ||
|
|
c1424c2a23 | ||
|
|
c11dc54ed1 | ||
|
|
554976390b | ||
|
|
ced279a867 | ||
|
|
8637d1864a | ||
|
|
c72a30aca5 | ||
|
|
d7205bb294 | ||
|
|
953ef93945 |
No files matched your search
@@ -0,0 +1,36 @@
|
|||||||
|
name: Test Crowdin Sync (Dry Run)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
dry_run:
|
||||||
|
description: 'Perform a dry run (logs changes without modifying repository)'
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
localization_branch:
|
||||||
|
description: 'Branch to target for translations'
|
||||||
|
type: string
|
||||||
|
default: 'l10n_main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-crowdin:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Test Crowdin Synchronization
|
||||||
|
uses: crowdin/github-action@v2
|
||||||
|
with:
|
||||||
|
upload_sources: true
|
||||||
|
upload_translations: false
|
||||||
|
download_translations: true
|
||||||
|
localization_branch_name: ${{ inputs.localization_branch }}
|
||||||
|
dry_run: ${{ inputs.dry_run }}
|
||||||
|
create_pull_request: false
|
||||||
|
env:
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
|
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
@@ -3,6 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- pontoon
|
- pontoon
|
||||||
|
- l10n_main
|
||||||
jobs:
|
jobs:
|
||||||
pull_request:
|
pull_request:
|
||||||
if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }}
|
if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }}
|
||||||
@@ -17,5 +18,5 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PONTOON_BOT_KEY }}
|
GH_TOKEN: ${{ secrets.PONTOON_BOT_KEY }}
|
||||||
run: |
|
run: |
|
||||||
gh_pr_up() { gh pr create "$@" --label "Area: Translation" --base main || gh pr edit "$@"; }
|
gh_pr_up() { gh pr create "$@" --draft --base main || gh pr edit "$@"; }
|
||||||
gh_pr_up --title "New Pontoon translations" --body "Please don't squash me 🥺"
|
gh_pr_up --title "New translations" --body "Please don't squash me 🥺"
|
||||||
@@ -1,14 +1,44 @@
|
|||||||
# This workflow will rebase `pontoon` with `main` changes, it's for making the
|
# This workflow will rebase `l10n_main` and `pontoon` with `main` changes, it's for making the
|
||||||
# Pontoon bot not try making commits to main
|
# translation bots not try making commits to main
|
||||||
|
|
||||||
name: Rebase pontoon branch to main
|
name: Rebase translation branches to main
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebase:
|
rebase-l10n:
|
||||||
|
if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: l10n_main
|
||||||
|
submodules: recursive
|
||||||
|
# Get all the git history for rebasing
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Rebase
|
||||||
|
run: |
|
||||||
|
git config --local user.name "slimevr-bot"
|
||||||
|
git config --local user.email '[email protected]'
|
||||||
|
git fetch origin main
|
||||||
|
git rebase origin/main
|
||||||
|
git submodule update
|
||||||
|
- name: Push rebase
|
||||||
|
uses: github-actions-x/[email protected]
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.PONTOON_BOT_KEY }}
|
||||||
|
push-branch: "l10n_main"
|
||||||
|
commit-message: "update"
|
||||||
|
force-push: "true"
|
||||||
|
name: "slimevr-bot"
|
||||||
|
email: "[email protected]"
|
||||||
|
|
||||||
|
rebase-pontoon:
|
||||||
if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }}
|
if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
+7
-1
@@ -25,7 +25,9 @@
|
|||||||
.settings
|
.settings
|
||||||
|
|
||||||
# Node Stuff
|
# Node Stuff
|
||||||
/node_modules
|
node_modules/
|
||||||
|
dist/
|
||||||
|
stats.html
|
||||||
.husky
|
.husky
|
||||||
|
|
||||||
# kotlin stuff
|
# kotlin stuff
|
||||||
@@ -33,6 +35,10 @@
|
|||||||
|
|
||||||
# ignore gradle build folder
|
# ignore gradle build folder
|
||||||
build/
|
build/
|
||||||
|
server/desktop/config/
|
||||||
|
|
||||||
|
# created by clangd for index cache
|
||||||
|
.cache/
|
||||||
|
|
||||||
# direnv has been claimed for Nix usage
|
# direnv has been claimed for Nix usage
|
||||||
.direnv/
|
.direnv/
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# Contributing to SlimeVR
|
# Contributing to SlimeVR
|
||||||
|
|
||||||
|
Please follow general contribution guidelines: [CONTRIBUTING.md](https://github.com/SlimeVR/.github/blob/main/profile/CONTRIBUTING.md).
|
||||||
|
|
||||||
This document describes essential knowledge required to contribute to the SlimeVR Server.
|
This document describes essential knowledge required to contribute to the SlimeVR Server.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
if ((Get-Command "clang-format" -ErrorAction SilentlyContinue) -eq $null) {
|
||||||
|
$errorObj = New-Object System.IO.FileNotFoundException("clang-format is not installed, please install clang-format via your package manager (e.g. winget/chocolatey/scoop) and re-run the script")
|
||||||
|
throw $errorObj
|
||||||
|
}
|
||||||
|
|
||||||
|
$SourceFiles = Get-ChildItem -Path '.\src\' -Recurse -Include "*.cpp","*.hpp"
|
||||||
|
foreach ($file in $SourceFiles) {
|
||||||
|
Write-Output "Formatting $(Resolve-Path -Relative $file.FullName)"
|
||||||
|
clang-format -i "$($file.FullName)"
|
||||||
|
}
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if ! command -v clang-format >/dev/null 2>&1; then
|
||||||
|
echo "clang-format is not installed, please install clang-format via your package manager (e.g. pacman/apt/dnf/winget) and re-run the script" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
find src/ \( \
|
||||||
|
-iname '*.cpp' \
|
||||||
|
-or -iname '*.hpp' \
|
||||||
|
\) \
|
||||||
|
-exec echo Formatting {} \; \
|
||||||
|
-exec clang-format -i {} \;
|
||||||
@@ -102,19 +102,34 @@ static void signal_handler(int signal) {
|
|||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
auto &logger = Logger::get();
|
auto &logger = Logger::get();
|
||||||
// Steam and SteamVR sets these environment variables on applications that it
|
|
||||||
// spawns, but if an app spawned by Steam then spawns a child that initialises
|
// Steam and SteamVR respectively set these environment variables on applications that
|
||||||
// OpenVR, SteamVR will give the child the appkey of the root application it
|
// they spawn, which the SteamVR client library (vrclient) will then use as the
|
||||||
// is a descendant of, e.g. if SteamVR launches SlimeVR as an overlay,
|
// application key when initiating the connection with vrserver. This may not
|
||||||
// it will set SteamAppId="3245490" and STEAMVR_APPKEY="steam.overlay.3245490"
|
// be ideal if we are launched by another Steam or OpenVR application, as we will inherit
|
||||||
// which breaks our bindings. We want SteamVR to use a generated appkey if
|
// their app key through the environment, which means SteamVR will load the wrong bindings.
|
||||||
// possible.
|
// A real-world example of this is if someone uses an application such as OpenVR-Autostarter
|
||||||
|
// to start the SlimeVR Server. OpenVR-Autostarter installs an application manifest with the
|
||||||
|
// app key "dreiekk.openvr-autostarter", so when it starts SlimeVR Server, which then starts us,
|
||||||
|
// the STEAMVR_APPKEY="dreiekk.openvr-autostarter" environment variable will be set.
|
||||||
|
//
|
||||||
|
// We want SteamVR to use the appkey of the Steam version of our application if possible.
|
||||||
|
// Unfortunately, we cannot install an application vrmanifest to force the app key,
|
||||||
|
// as SteamVR requires a binary path in the manifest to consider it valid. We do not want to install
|
||||||
|
// a manifest with a binary path because we want the SlimeVR Server to start us when the
|
||||||
|
// driver initiates a connection, rather than getting auto-started by SteamVR.
|
||||||
|
//
|
||||||
|
// This is not documented anywhere publicly, see CVRClient::SendConnectMessage in vrclient instead.
|
||||||
|
|
||||||
|
constexpr const char *STEAM_APPID = "3245490";
|
||||||
|
constexpr const char *STEAMVR_APPKEY = "steam.overlay.3245490";
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetEnvironmentVariableA("SteamAppId", nullptr);
|
SetEnvironmentVariableA("SteamAppId", STEAM_APPID);
|
||||||
SetEnvironmentVariableA("STEAMVR_APPKEY", nullptr);
|
SetEnvironmentVariableA("STEAMVR_APPKEY", STEAMVR_APPKEY);
|
||||||
#else
|
#else
|
||||||
unsetenv("SteamAppId");
|
setenv("SteamAppId", STEAM_APPID, 1);
|
||||||
unsetenv("STEAMVR_APPKEY");
|
setenv("STEAMVR_APPKEY", STEAMVR_APPKEY, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#include "solarxr.hpp"
|
#include "solarxr.hpp"
|
||||||
#include "logger.hpp"
|
#include "logger.hpp"
|
||||||
|
#include "paths.hpp"
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@@ -14,15 +16,24 @@
|
|||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
static std::string getenvSafe(const char *env) {
|
||||||
|
char *v = getenv(env);
|
||||||
|
if (v == nullptr)
|
||||||
|
return {};
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
fs::path SolarXRConnection::getSocketPath() {
|
fs::path SolarXRConnection::getSocketPath() {
|
||||||
using namespace std::string_view_literals;
|
using namespace std::string_view_literals;
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#define MAKE_SOCKET_PATH(PATH) \
|
#define MAKE_SOCKET_PATH(PATH) \
|
||||||
std::make_pair(PATH##sv, static_cast<const char *>(getenv(PATH)))
|
std::make_pair(PATH##sv, getenvSafe(PATH))
|
||||||
|
|
||||||
constexpr std::string_view socketName = "SlimeVRRpc";
|
constexpr std::string_view socketName = "SlimeVRRpc";
|
||||||
std::array<std::pair<std::string_view, const char *>, 4> socketPaths{
|
std::array<std::pair<std::string_view, fs::path>, 5> socketPaths{
|
||||||
MAKE_SOCKET_PATH("SLIMEVR_SOCKET_DIR"),
|
MAKE_SOCKET_PATH("SLIMEVR_SOCKET_DIR"),
|
||||||
|
{ "Steam socket path", Paths::getDataPath() },
|
||||||
MAKE_SOCKET_PATH("XDG_RUNTIME_DIR"),
|
MAKE_SOCKET_PATH("XDG_RUNTIME_DIR"),
|
||||||
MAKE_SOCKET_PATH("TMPDIR"),
|
MAKE_SOCKET_PATH("TMPDIR"),
|
||||||
{ "/tmp", "/tmp" }
|
{ "/tmp", "/tmp" }
|
||||||
@@ -31,17 +42,17 @@ fs::path SolarXRConnection::getSocketPath() {
|
|||||||
#undef MAKE_SOCKET_PATH
|
#undef MAKE_SOCKET_PATH
|
||||||
|
|
||||||
for (auto [name, path] : socketPaths) {
|
for (auto [name, path] : socketPaths) {
|
||||||
if (path == nullptr) {
|
if (path.empty()) {
|
||||||
Logger::get().info(
|
Logger::get().info(
|
||||||
"Skipping socket directory {} because it doesn't exist", name);
|
"Skipping socket directory '{}' because it doesn't exist", name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
fs::path socketPath = fs::path(path) / socketName;
|
fs::path socketPath = path / socketName;
|
||||||
if (fs::exists(socketPath))
|
if (fs::exists(socketPath))
|
||||||
return socketPath;
|
return socketPath;
|
||||||
|
|
||||||
Logger::get().info(
|
Logger::get().info(
|
||||||
"Skipping socket directory {} because socket does not exist", name);
|
"Skipping socket directory '{}' because socket does not exist", name);
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
throw std::logic_error(
|
throw std::logic_error(
|
||||||
|
|||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
# Crowdin Configuration File
|
||||||
|
# https://developer.crowdin.com/configuration-file/
|
||||||
|
|
||||||
|
project_id_env: CROWDIN_PROJECT_ID
|
||||||
|
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||||
|
|
||||||
|
files:
|
||||||
|
- source: /gui/app/public/i18n/en/translation.ftl
|
||||||
|
translation: /gui/app/public/i18n/%locale%/%original_file_name%
|
||||||
|
languages_mapping:
|
||||||
|
locale:
|
||||||
|
zh-CN: zh-Hans
|
||||||
|
zh-TW: zh-Hant
|
||||||
|
nb: nb-NO
|
||||||
|
nb-NO: nb-NO
|
||||||
|
sv: sv-SE
|
||||||
|
sv-SE: sv-SE
|
||||||
|
en-OWO: en-x-owo
|
||||||
|
owo: en-x-owo
|
||||||
@@ -690,17 +690,15 @@ settings-general-gesture_control-trackers = { $amount ->
|
|||||||
settings-general-gesture_control-yawResetEnabled = Enable tap to yaw reset
|
settings-general-gesture_control-yawResetEnabled = Enable tap to yaw reset
|
||||||
settings-general-gesture_control-yawResetDelay = Yaw reset delay
|
settings-general-gesture_control-yawResetDelay = Yaw reset delay
|
||||||
settings-general-gesture_control-yawResetTaps = Taps for yaw reset
|
settings-general-gesture_control-yawResetTaps = Taps for yaw reset
|
||||||
settings-general-gesture_control-yawResetTracker = Yaw Reset Tracker
|
settings-general-gesture_control-yawResetTracker = Yaw reset tracker
|
||||||
settings-general-gesture_control-fullResetEnabled = Enable tap to full reset
|
settings-general-gesture_control-fullResetEnabled = Enable tap to full reset
|
||||||
settings-general-gesture_control-fullResetDelay = Full reset delay
|
settings-general-gesture_control-fullResetDelay = Full reset delay
|
||||||
settings-general-gesture_control-fullResetTaps = Taps for full reset
|
settings-general-gesture_control-fullResetTaps = Taps for full reset
|
||||||
settings-general-gesture_control-fullResetTracker = Full Reset Tracker
|
settings-general-gesture_control-fullResetTracker = Full reset tracker
|
||||||
settings-general-gesture_control-mountingResetEnabled = Enable tap to perform mounting calibration
|
settings-general-gesture_control-mountingResetEnabled = Enable tap to perform mounting calibration
|
||||||
settings-general-gesture_control-mountingResetDelay = Mounting calibration delay
|
settings-general-gesture_control-mountingResetDelay = Mounting calibration delay
|
||||||
settings-general-gesture_control-mountingResetTaps = Taps for mounting calibration
|
settings-general-gesture_control-mountingResetTaps = Taps for mounting calibration
|
||||||
settings-general-gesture_control-mountingResetTracker = Mounting Reset Tracker
|
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
|
# 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 = 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.
|
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.
|
||||||
|
|||||||
@@ -1317,7 +1317,7 @@ export function GeneralSettings() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
||||||
<div>
|
<div>
|
||||||
<Typography variant="section-title">
|
<Typography bold>
|
||||||
{l10n.getString(
|
{l10n.getString(
|
||||||
'settings-general-gesture_control-yawResetTracker'
|
'settings-general-gesture_control-yawResetTracker'
|
||||||
)}
|
)}
|
||||||
@@ -1331,21 +1331,7 @@ export function GeneralSettings() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Typography variant="section-title">
|
<Typography bold>
|
||||||
{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(
|
{l10n.getString(
|
||||||
'settings-general-gesture_control-fullResetTracker'
|
'settings-general-gesture_control-fullResetTracker'
|
||||||
)}
|
)}
|
||||||
@@ -1358,6 +1344,20 @@ export function GeneralSettings() {
|
|||||||
items={bodyParts}
|
items={bodyParts}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<Typography bold>
|
||||||
|
{l10n.getString(
|
||||||
|
'settings-general-gesture_control-mountingResetTracker'
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
<Dropdown
|
||||||
|
display="block"
|
||||||
|
control={control}
|
||||||
|
placeholder={''}
|
||||||
|
name="tapDetection.mountingResetTracker"
|
||||||
|
items={bodyParts}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
<div className="grid sm:grid-cols-3 gap-5 pb-2">
|
||||||
|
|||||||
@@ -406,7 +406,9 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
|
|||||||
var rot = packet.rotation
|
var rot = packet.rotation
|
||||||
rot = AXES_OFFSET.times(rot)
|
rot = AXES_OFFSET.times(rot)
|
||||||
val tracker = connection?.getTracker(packet.sensorId) ?: return
|
val tracker = connection?.getTracker(packet.sensorId) ?: return
|
||||||
if (tracker.status == TrackerStatus.DISCONNECTED) tracker.status = TrackerStatus.OK
|
if (tracker.status == TrackerStatus.DISCONNECTED || tracker.status == TrackerStatus.TIMED_OUT) {
|
||||||
|
tracker.status = TrackerStatus.OK
|
||||||
|
}
|
||||||
tracker.setRotation(rot)
|
tracker.setRotation(rot)
|
||||||
if (packet is UDPPacket23RotationAndAcceleration) {
|
if (packet is UDPPacket23RotationAndAcceleration) {
|
||||||
// sensorOffset is applied correctly since protocol 22
|
// sensorOffset is applied correctly since protocol 22
|
||||||
@@ -422,7 +424,9 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
|
|||||||
|
|
||||||
is UDPPacket17RotationData -> {
|
is UDPPacket17RotationData -> {
|
||||||
val tracker = connection?.getTracker(packet.sensorId) ?: return
|
val tracker = connection?.getTracker(packet.sensorId) ?: return
|
||||||
if (tracker.status == TrackerStatus.DISCONNECTED) tracker.status = TrackerStatus.OK
|
if (tracker.status == TrackerStatus.DISCONNECTED || tracker.status == TrackerStatus.TIMED_OUT) {
|
||||||
|
tracker.status = TrackerStatus.OK
|
||||||
|
}
|
||||||
var rot17 = packet.rotation
|
var rot17 = packet.rotation
|
||||||
rot17 = AXES_OFFSET * rot17
|
rot17 = AXES_OFFSET * rot17
|
||||||
when (packet.dataType) {
|
when (packet.dataType) {
|
||||||
@@ -446,7 +450,9 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
|
|||||||
|
|
||||||
is UDPPacket4Acceleration -> {
|
is UDPPacket4Acceleration -> {
|
||||||
val tracker = connection?.getTracker(packet.sensorId) ?: return
|
val tracker = connection?.getTracker(packet.sensorId) ?: return
|
||||||
if (tracker.status == TrackerStatus.DISCONNECTED) tracker.status = TrackerStatus.OK
|
if (tracker.status == TrackerStatus.DISCONNECTED || tracker.status == TrackerStatus.TIMED_OUT) {
|
||||||
|
tracker.status = TrackerStatus.OK
|
||||||
|
}
|
||||||
// sensorOffset is applied correctly since protocol 22
|
// sensorOffset is applied correctly since protocol 22
|
||||||
// See: https://github.com/SlimeVR/SlimeVR-Tracker-ESP/pull/480
|
// See: https://github.com/SlimeVR/SlimeVR-Tracker-ESP/pull/480
|
||||||
if (connection.protocolVersion >= 22) {
|
if (connection.protocolVersion >= 22) {
|
||||||
|
|||||||
@@ -58,11 +58,6 @@ class BindingsProviderManager : Runnable {
|
|||||||
"BindingsProviderManager already running"
|
"BindingsProviderManager already running"
|
||||||
}
|
}
|
||||||
|
|
||||||
val binaryPath = getBinaryPath() ?: throw RuntimeException("Unable to find bindings provider binary")
|
|
||||||
process = ProcessBuilder(binaryPath.toString())
|
|
||||||
.redirectErrorStream(true)
|
|
||||||
.start()
|
|
||||||
LogManager.info("[BindingsProviderManager] Started process")
|
|
||||||
watcherThread = Thread(this, "Bindings provider watcher")
|
watcherThread = Thread(this, "Bindings provider watcher")
|
||||||
watcherThread!!.start()
|
watcherThread!!.start()
|
||||||
}
|
}
|
||||||
@@ -77,6 +72,17 @@ class BindingsProviderManager : Runnable {
|
|||||||
|
|
||||||
override fun run() {
|
override fun run() {
|
||||||
try {
|
try {
|
||||||
|
// Give SteamVR a bit more time to initialise everything
|
||||||
|
// For some users, starting the executable immediately may cause startup failures
|
||||||
|
// This feels like a bit of a hack, but whatever
|
||||||
|
Thread.sleep(3000L)
|
||||||
|
|
||||||
|
val binaryPath = getBinaryPath() ?: throw RuntimeException("Unable to find bindings provider binary")
|
||||||
|
process = ProcessBuilder(binaryPath.toString())
|
||||||
|
.redirectErrorStream(true)
|
||||||
|
.start()
|
||||||
|
LogManager.info("[BindingsProviderManager] Started process")
|
||||||
|
|
||||||
val interval = 1000L / 30L
|
val interval = 1000L / 30L
|
||||||
while (process?.isAlive == true) {
|
while (process?.isAlive == true) {
|
||||||
Thread.sleep(interval)
|
Thread.sleep(interval)
|
||||||
|
|||||||
Reference in new issue
Block a user