Skip to content

Commit

Permalink
Merge pull request #3 from KinectToVR/calibration-lock
Browse files Browse the repository at this point in the history
Calibration lock, better status check (HRESULT)
  • Loading branch information
KimihikoAkayasaki authored Sep 30, 2022
2 parents e651a22 + 511b4a5 commit c1e74bc
Show file tree
Hide file tree
Showing 15 changed files with 302 additions and 1,053 deletions.
34 changes: 23 additions & 11 deletions Amethyst/Amethyst.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@
<Midl Include="App.idl" />
<Midl Include="MainWindow.idl" />
<Midl Include="DeviceEntryView.idl">
<Filter>MVVM\Models</Filter>
<Filter>MVVM\Devices %28List%29</Filter>
</Midl>
<Midl Include="CalibrationDeviceEntryView.idl">
<Filter>MVVM\Calibration</Filter>
</Midl>
<Midl Include="CalibrationDeviceEntryView.idl" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="DeviceEntryView.cpp">
<Filter>MVVM\Models</Filter>
<Filter>MVVM\Devices %28List%29</Filter>
</ClCompile>
<ClCompile Include="CalibrationDeviceEntryView.cpp">
<Filter>MVVM\Calibration</Filter>
</ClCompile>
<ClCompile Include="CalibrationDeviceEntryView.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
Expand Down Expand Up @@ -85,10 +89,6 @@
<ClInclude Include="K2DeviceMath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="DeviceEntryView.h">
<Filter>MVVM\Models</Filter>
</ClInclude>
<ClInclude Include="CalibrationDeviceEntryView.h" />
<ClInclude Include="..\external\vendor\EigenUtils.h">
<Filter>Header Files\Vendor Files</Filter>
</ClInclude>
Expand All @@ -98,6 +98,12 @@
<ClInclude Include="..\external\vendor\LowpassFilter.h">
<Filter>Header Files\Vendor Files</Filter>
</ClInclude>
<ClInclude Include="DeviceEntryView.h">
<Filter>MVVM\Devices %28List%29</Filter>
</ClInclude>
<ClInclude Include="CalibrationDeviceEntryView.h">
<Filter>MVVM\Calibration</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Assets\Wide310x150Logo.scale-200.png">
Expand Down Expand Up @@ -285,12 +291,18 @@
<Filter Include="MVVM">
<UniqueIdentifier>{1176953b-651a-45ae-91b8-d08897d0b5ad}</UniqueIdentifier>
</Filter>
<Filter Include="MVVM\Models">
<UniqueIdentifier>{458168fc-b988-48fc-9dbe-d5d64397f589}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Vendor Files">
<UniqueIdentifier>{e999f062-3d8f-477f-af9e-551ce781d26f}</UniqueIdentifier>
</Filter>
<Filter Include="MVVM\Calibration">
<UniqueIdentifier>{3dfec5f2-d381-4b75-9f0b-fc62a121a5a3}</UniqueIdentifier>
</Filter>
<Filter Include="MVVM\Devices %28List%29">
<UniqueIdentifier>{cd6db647-f01b-46cf-99fd-34121bd9c381}</UniqueIdentifier>
</Filter>
<Filter Include="MVVM\Devices %28Manager%29">
<UniqueIdentifier>{a1a195ae-ac4e-4018-92ad-70d12867b1b3}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
Expand Down
2 changes: 2 additions & 0 deletions Amethyst/Assets/Strings/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"/GeneralPage/Tips/TrackingFreeze/Buttons/WMR": "die Menütaste, Grip und Trigger",
"/GeneralPage/Tips/TrackingFreeze/Footer": "Die Tastenbelegung kann in den SteamVR-Eingabeeinstellungen geändert werden.",
"/GeneralPage/Tips/TrackingFreeze/Header": "Man kann das Einfrieren der Tracker in VR umschalten, indem man {0} auf dem linken Controller drückt.",
"/GeneralPage/Tips/NoCalibration/Footer": "Device you're trying to calibrate is reporting a status error.\nPlease make sure it's connected and working properly.",
"/GeneralPage/Tips/NoCalibration/Header": "This device can't be calibrated right now!",
"/GeneralPage/Titles/Device": "Gerät",
"/GeneralPage/Titles/Status": "Status",
"/GeneralPage/Titles/Trackers": "Tracker",
Expand Down
2 changes: 2 additions & 0 deletions Amethyst/Assets/Strings/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"/GeneralPage/Tips/TrackingFreeze/Buttons/WMR": "the Menu Button, Grip and Trigger",
"/GeneralPage/Tips/TrackingFreeze/Footer": "This binding can be changed within SteamVR input settings.",
"/GeneralPage/Tips/TrackingFreeze/Header": "You can also toggle tracker freeze while in VR! \nPress {0} on your left controller.",
"/GeneralPage/Tips/NoCalibration/Footer": "Device you're trying to calibrate is reporting a status error.\nPlease make sure it's connected and working properly.",
"/GeneralPage/Tips/NoCalibration/Header": "This device can't be calibrated right now!",
"/GeneralPage/Titles/Device": "Device",
"/GeneralPage/Titles/Status": "Status",
"/GeneralPage/Titles/Trackers": "Trackers",
Expand Down
2 changes: 2 additions & 0 deletions Amethyst/Assets/Strings/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"/GeneralPage/Tips/TrackingFreeze/Buttons/WMR": "le bouton \"Menu\", la gâchette et le bouton du coté",
"/GeneralPage/Tips/TrackingFreeze/Footer": "La combinaison peut être changée dans les options de SteamVR.",
"/GeneralPage/Tips/TrackingFreeze/Header": "Vous pouvez aussi activer/désactiver cette fonction en appuyant sur {0} sur la manette gauche.",
"/GeneralPage/Tips/NoCalibration/Footer": "Device you're trying to calibrate is reporting a status error.\nPlease make sure it's connected and working properly.",
"/GeneralPage/Tips/NoCalibration/Header": "This device can't be calibrated right now!",
"/GeneralPage/Titles/Device": "Appareil",
"/GeneralPage/Titles/Status": "Statut",
"/GeneralPage/Titles/Trackers": "Trackers",
Expand Down
2 changes: 2 additions & 0 deletions Amethyst/Assets/Strings/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"/GeneralPage/Tips/TrackingFreeze/Buttons/WMR": "кнопка меню, рукоятка и триггер",
"/GeneralPage/Tips/TrackingFreeze/Footer": "Эту привязку можно изменить в настройках входа SteamVR.",
"/GeneralPage/Tips/TrackingFreeze/Header": "Вы также можете переключить заморозку трекера во время нахождения в VR, нажав {0} на левом контроллере.",
"/GeneralPage/Tips/NoCalibration/Footer": "Device you're trying to calibrate is reporting a status error.\nPlease make sure it's connected and working properly.",
"/GeneralPage/Tips/NoCalibration/Header": "This device can't be calibrated right now!",
"/GeneralPage/Titles/Device": "Устройство",
"/GeneralPage/Titles/Status": "Статус",
"/GeneralPage/Titles/Trackers": "Трекеры",
Expand Down
5 changes: 5 additions & 0 deletions Amethyst/CalibrationDeviceEntryView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ namespace winrt::Amethyst::implementation
return value;
}

double CalibrationDeviceEntryView::ErrorToOpacity(const bool& value)
{
return value ? 0.5 : 1.0; // Dim on errors
}

event_token CalibrationDeviceEntryView::PropertyChanged(
const Microsoft::UI::Xaml::Data::PropertyChangedEventHandler& handler)
{
Expand Down
1 change: 1 addition & 0 deletions Amethyst/CalibrationDeviceEntryView.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace winrt::Amethyst::implementation
Windows::Foundation::IAsyncAction StatusError(const bool& value);

double BoolToOpacity(const bool& value);
double ErrorToOpacity(const bool& value);

[[nodiscard]] event_token PropertyChanged(
const Microsoft::UI::Xaml::Data::PropertyChangedEventHandler& value);
Expand Down
1 change: 1 addition & 0 deletions Amethyst/CalibrationDeviceEntryView.idl
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ namespace Amethyst
Boolean StatusError;

Double BoolToOpacity(Boolean value);
Double ErrorToOpacity(Boolean value);
}
}
Loading

0 comments on commit c1e74bc

Please sign in to comment.