Skip to content

Commit

Permalink
Merge branch 'main' into fingers
Browse files Browse the repository at this point in the history
  • Loading branch information
Erimelowo committed Aug 26, 2024
2 parents ce613d5 + 4564850 commit c930718
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 19 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
4 changes: 2 additions & 2 deletions .github/workflows/build-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Binary file modified gui/public/images/mounting-reset-pose.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions gui/src-tauri/src/presence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ async fn make_client(subs: ds::Subscriptions) -> Result<Option<DiscordClient>> {
};
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 }))
}
Expand Down
29 changes: 27 additions & 2 deletions gui/src/components/onboarding/pages/mounting/ManualMounting.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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 (
<>
<MountingSelectionMenu
bodyPart={selectedRole}
currRotation={getCurrRotation(selectedRole)}
isOpen={selectedRole !== BodyPart.NONE}
onClose={() => setSelectRole(BodyPart.NONE)}
onDirectionSelected={onDirectionSelected}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export function MountingResetStep({
</div>

{isMobile && (
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center px-12">
<div className="flex flex-col items-center fill-background-50 justify-center">
<img
src="/images/mounting-reset-pose.webp"
width={125}
width={450}
alt="mounting reset ski pose"
/>
</div>
Expand All @@ -65,10 +65,10 @@ export function MountingResetStep({
</div>
</div>
{!isMobile && (
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center px-12">
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center">
<img
src="/images/mounting-reset-pose.webp"
width={125}
width={600}
alt="mounting reset ski pose"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export function TrackersAssignPage() {
)}
</div>
</div>
<div className="flex flex-col rounded-xl fill-background-50">
<div className="flex flex-col rounded-xl fill-background-50 pt-1">
<BodyAssignment
width={isMobile ? 150 : undefined}
dotSize={isMobile ? 10 : undefined}
Expand Down
3 changes: 3 additions & 0 deletions server/android/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
-dontwarn org.apache.logging.log4j.message.MessageFactory
-dontwarn org.apache.logging.log4j.spi.ExtendedLogger
-dontwarn org.apache.logging.log4j.spi.ExtendedLoggerWrapper
-dontwarn org.apache.log4j.Level
-dontwarn org.apache.log4j.Logger
-dontwarn org.apache.log4j.Priority
-dontwarn org.conscrypt.BufferAllocator
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.HandshakeListener
Expand Down
2 changes: 1 addition & 1 deletion server/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.apache.commons:commons-collections4:4.4")

implementation("com.illposed.osc:javaosc-core:0.9")
implementation("com.illposed.osc:javaosc-core:0.8")
implementation("org.java-websocket:Java-WebSocket:1.+")
implementation("com.melloware:jintellitype:1.+")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,7 @@ class HumanSkeleton(
val trackersToReset: List<Tracker?>
get() = listOf(
neckTracker,
upperChestTracker,
chestTracker,
waistTracker,
hipTracker,
Expand Down

0 comments on commit c930718

Please sign in to comment.