diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..df4d15b35c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/build-gui.yml b/.github/workflows/build-gui.yml index 828bc32dd1..11aa25aed0 100644 --- a/.github/workflows/build-gui.yml +++ b/.github/workflows/build-gui.yml @@ -25,7 +25,7 @@ jobs: with: submodules: recursive - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - name: Use Node.js uses: actions/setup-node@v4 with: @@ -72,7 +72,7 @@ jobs: with: shared-key: "${{ matrix.os }}" - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - name: Use Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/gradle.yaml b/.github/workflows/gradle.yaml index 720dca40fe..d69ad4fc3f 100644 --- a/.github/workflows/gradle.yaml +++ b/.github/workflows/gradle.yaml @@ -33,7 +33,7 @@ jobs: distribution: "adopt" - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - run: mkdir ./gui/dist && touch ./gui/dist/somefile shell: bash @@ -63,7 +63,7 @@ jobs: distribution: "adopt" - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build with Gradle run: ./gradlew shadowJar @@ -103,9 +103,9 @@ jobs: distribution: "adopt" - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - name: Use Node.js uses: actions/setup-node@v4 with: @@ -173,7 +173,7 @@ jobs: with: shared-key: "ubuntu-22.04" - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - name: Use Node.js uses: actions/setup-node@v4 with: @@ -248,7 +248,7 @@ jobs: with: shared-key: "macos-latest" - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - name: Use Node.js uses: actions/setup-node@v4 with: @@ -320,7 +320,7 @@ jobs: with: shared-key: "windows-latest" - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - name: Use Node.js uses: actions/setup-node@v4 with: diff --git a/gui/public/images/mounting-reset-pose.webp b/gui/public/images/mounting-reset-pose.webp index f8668ec0c3..ce08ec8a90 100644 Binary files a/gui/public/images/mounting-reset-pose.webp and b/gui/public/images/mounting-reset-pose.webp differ diff --git a/gui/src-tauri/src/presence.rs b/gui/src-tauri/src/presence.rs index f318304750..accc0061cb 100644 --- a/gui/src-tauri/src/presence.rs +++ b/gui/src-tauri/src/presence.rs @@ -33,14 +33,14 @@ async fn make_client(subs: ds::Subscriptions) -> Result> { }; e?; - let user = match &*user.0.borrow() { + let _ = match &*user.0.borrow() { ds::wheel::UserState::Connected(user) => user.clone(), ds::wheel::UserState::Disconnected(err) => { bail!("failed to connect to Discord: {err}"); } }; - log::info!(target: "discord_presence", "connected to Discord, local user name is {}", user.username); + log::info!(target: "discord_presence", "connected to Discord!"); Ok(Some(DiscordClient { discord, wheel })) } diff --git a/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx b/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx index 9bb8ea4794..48bc007b9a 100644 --- a/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx +++ b/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx @@ -1,10 +1,14 @@ -import { useMemo, useState } from 'react'; +import { useCallback, useMemo, useState } from 'react'; import { AssignTrackerRequestT, BodyPart, RpcMessage } from 'solarxr-protocol'; import { FlatDeviceTracker } from '@/hooks/app'; import { useOnboarding } from '@/hooks/onboarding'; import { useTrackers } from '@/hooks/tracker'; import { useWebsocketAPI } from '@/hooks/websocket-api'; -import { MountingOrientationDegreesToQuatT } from '@/maths/quaternion'; +import { + MountingOrientationDegreesToQuatT, + QuaternionFromQuatT, + similarQuaternions, +} from '@/maths/quaternion'; import { Button } from '@/components/commons/Button'; import { TipBox } from '@/components/commons/TipBox'; import { Typography } from '@/components/commons/Typography'; @@ -62,10 +66,31 @@ export function ManualMountingPage() { setSelectRole(BodyPart.NONE); }; + const getCurrRotation = useCallback( + (role: BodyPart) => { + if (role === BodyPart.NONE) return undefined; + + const trackers = trackerPartGrouped[role] || []; + const [mountingOrientation, ...orientation] = trackers + .map((td) => td.tracker.info?.mountingOrientation) + .filter((orientation) => !!orientation) + .map((orientation) => QuaternionFromQuatT(orientation)); + + const identicalOrientations = + mountingOrientation !== undefined && + orientation.every((quat) => + similarQuaternions(quat, mountingOrientation) + ); + return identicalOrientations ? mountingOrientation : undefined; + }, + [trackerPartGrouped] + ); + return ( <> setSelectRole(BodyPart.NONE)} onDirectionSelected={onDirectionSelected} diff --git a/gui/src/components/onboarding/pages/mounting/mounting-steps/MountingReset.tsx b/gui/src/components/onboarding/pages/mounting/mounting-steps/MountingReset.tsx index 92a5feaffd..daa34f76d7 100644 --- a/gui/src/components/onboarding/pages/mounting/mounting-steps/MountingReset.tsx +++ b/gui/src/components/onboarding/pages/mounting/mounting-steps/MountingReset.tsx @@ -41,10 +41,10 @@ export function MountingResetStep({ {isMobile && ( -
+
mounting reset ski pose
@@ -65,10 +65,10 @@ export function MountingResetStep({
{!isMobile && ( -
+
mounting reset ski pose
diff --git a/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx b/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx index 32f848048f..e4db370c8e 100644 --- a/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx +++ b/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx @@ -334,7 +334,7 @@ export function TrackersAssignPage() { )}
-
+
get() = listOf( neckTracker, + upperChestTracker, chestTracker, waistTracker, hipTracker,