Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gui/public/i18n/en/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,8 @@ 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
settings-general-fk_settings-reset_settings = Reset settings
settings-general-fk_settings-reset_settings-step_mounting-description = Use step mounting method instead of ski pose.
settings-general-fk_settings-reset_settings-step_mounting = Step mounting
settings-general-fk_settings-reset_settings-reset_hmd_pitch-description = Reset the HMD's pitch (vertical rotation) upon doing a full reset. Useful if wearing an HMD on the forehead for VTubing or mocap. Do not enable for VR.
settings-general-fk_settings-reset_settings-reset_hmd_pitch = Reset HMD pitch
settings-general-fk_settings-arm_fk-reset_mode-description = Change which arm pose is expected for mounting calibration.
Expand Down
90 changes: 54 additions & 36 deletions gui/src/components/settings/pages/GeneralSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -872,46 +872,64 @@ export function GeneralSettings() {
/>
</div>

<div className="flex flex-col pt-2">
<div className="flex flex-col pt-2 pb-2">
<Typography variant="section-title">
{l10n.getString('settings-general-fk_settings-reset_settings')}
</Typography>
</div>
<div className="flex flex-col pt-2 pb-3">
<div className="grid grid-cols-2 gap-2">
<div className="flex flex-col gap-2">
<Typography>
{l10n.getString(
'settings-general-fk_settings-reset_settings-reset_hmd_pitch-description'
)}
</Typography>
<CheckBox
variant="toggle"
outlined
control={control}
name="resetsSettings.resetHmdPitch"
label={l10n.getString(
'settings-general-fk_settings-reset_settings-reset_hmd_pitch'
)}
/>
</div>
<div className="flex flex-col gap-2 justify-end">
<Typography>
{l10n.getString(
'settings-general-fk_settings-leg_fk-reset_mounting_feet-description-v1'
)}
</Typography>
<CheckBox
variant="toggle"
outlined
control={control}
name="resetsSettings.resetMountingFeet"
label={l10n.getString(
'settings-general-fk_settings-leg_fk-reset_mounting_feet-v1'
)}
/>
</div>
</div>
<div className="grid sm:grid-cols-1 gap-3 pb-3">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we stop copy pasting without checking what it does.
You are making a grid with only one item 🤷

<Typography>
{l10n.getString(
'settings-general-fk_settings-reset_settings-step_mounting-description'
)}
</Typography>
</div>
<div className="grid sm:grid-cols-1 gap-2 pb-3">
<CheckBox
variant="toggle"
outlined
control={control}
name="resetsSettings.stepMounting"
label={l10n.getString(
'settings-general-fk_settings-reset_settings-step_mounting'
)}
/>
</div>
<div className="grid sm:grid-cols-1 gap-3 pb-3">
<Typography>
{l10n.getString(
'settings-general-fk_settings-reset_settings-reset_hmd_pitch-description'
)}
</Typography>
</div>
<div className="grid sm:grid-cols-1 gap-3 pb-3">
<CheckBox
variant="toggle"
outlined
control={control}
name="resetsSettings.resetHmdPitch"
label={l10n.getString(
'settings-general-fk_settings-reset_settings-reset_hmd_pitch'
)}
/>
</div>
<div className="grid sm:grid-cols-1 gap-3 pb-3">
<Typography>
{l10n.getString(
'settings-general-fk_settings-leg_fk-reset_mounting_feet-description-v1'
)}
</Typography>
</div>
<div className="grid sm:grid-cols-1 gap-3 pb-3">
<CheckBox
variant="toggle"
outlined
control={control}
name="resetsSettings.resetMountingFeet"
label={l10n.getString(
'settings-general-fk_settings-leg_fk-reset_mounting_feet-v1'
)}
/>
</div>

<div>
Expand Down
4 changes: 3 additions & 1 deletion gui/src/components/tracker/TrackerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ function TrackerSmol({
'border-[3px] border-opacity-80 rounded-md overflow-clip',
{
'border-status-warning': warning,
'border-transparent': !warning,
'border-transparent':
!warning && !tracker.accelRecordingInProgress,
'border-status-recording': tracker.accelRecordingInProgress,
}
)}
>
Expand Down
4 changes: 3 additions & 1 deletion gui/src/components/tracker/TrackersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export function TrackerNameCell({
'border-[2px] border-opacity-80 rounded-md overflow-clip',
{
'border-status-warning': warning,
'border-transparent': !warning,
'border-transparent':
!warning && !tracker.accelRecordingInProgress,
'border-status-recording': tracker.accelRecordingInProgress,
}
)}
>
Expand Down
1 change: 1 addition & 0 deletions gui/src/hooks/datafeed-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function useDataFeedConfig() {
trackerData.tps = true;
trackerData.rawMagneticVector = true;
trackerData.stayAligned = true;
trackerData.accelRecordingInProgress = true;

const dataMask = new DeviceDataMaskT();
dataMask.deviceData = true;
Expand Down
3 changes: 3 additions & 0 deletions gui/src/hooks/reset-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ResetSettingsForm {
yawResetSmoothTime: number;
saveMountingReset: boolean;
resetHmdPitch: boolean;
stepMounting: boolean;
}

export const defaultResetSettings = {
Expand All @@ -22,6 +23,7 @@ export const defaultResetSettings = {
yawResetSmoothTime: 0.0,
saveMountingReset: false,
resetHmdPitch: false,
stepMounting: false,
};

export function loadResetSettings(resetSettingsForm: ResetSettingsForm) {
Expand All @@ -31,6 +33,7 @@ export function loadResetSettings(resetSettingsForm: ResetSettingsForm) {
resetsSettings.yawResetSmoothTime = resetSettingsForm.yawResetSmoothTime;
resetsSettings.saveMountingReset = resetSettingsForm.saveMountingReset;
resetsSettings.resetHmdPitch = resetSettingsForm.resetHmdPitch;
resetsSettings.stepMounting = resetSettingsForm.stepMounting;

return resetsSettings;
}
Expand Down
1 change: 1 addition & 0 deletions gui/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ body {
--warning: 255, 225, 53;
--critical: 223, 109, 140;
--special: 164, 79, 237;
--recording: 255, 84, 84;
--window-icon-stroke: 192, 161, 216;

--default-color: 255, 255, 255;
Expand Down
1 change: 1 addition & 0 deletions gui/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ const config = {
warning: 'rgb(var(--warning), <alpha-value>)',
critical: 'rgb(var(--critical), <alpha-value>)',
special: 'rgb(var(--special), <alpha-value>)',
recording: 'rgb(var(--recording), <alpha-value>)',
},
window: {
icon: 'rgb(var(--window-icon-stroke), <alpha-value>)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ enum class MountingMethods(val id: Int) {
}

class ResetsConfig {
var stepMounting = false

// Always reset mounting for feet
var resetMountingFeet = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ fun createTrackerData(
if (mask.stayAligned) {
TrackerData.addStayAligned(fbb, stayAlignedOffset)
}
if (mask.accelRecordingInProgress) {
TrackerData.addAccelRecordingInProgress(fbb, tracker.accelMountInProgress)
}

return TrackerData.endTrackerData(fbb)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ fun createArmsResetModeSettings(
resetsConfig.yawResetSmoothTime,
resetsConfig.saveMountingReset,
resetsConfig.resetHmdPitch,
resetsConfig.stepMounting,
)

fun createSettingsResponse(fbb: FlatBufferBuilder, server: VRServer): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) {
resetsConfig.saveMountingReset = req.resetsSettings().saveMountingReset()
resetsConfig.yawResetSmoothTime = req.resetsSettings().yawResetSmoothTime()
resetsConfig.resetHmdPitch = req.resetsSettings().resetHmdPitch()
resetsConfig.stepMounting = req.resetsSettings().stepMounting()
resetsConfig.updateTrackersResetsSettings()
}

Expand Down
Loading