Skip to content

Commit

Permalink
Improved messaging system between Desktop and overlay. Add VXM Overla…
Browse files Browse the repository at this point in the history
…y splash. Add Improved Left/Right hand buttons.
  • Loading branch information
Soapwood committed May 4, 2024
1 parent 4655945 commit 6e91885
Show file tree
Hide file tree
Showing 479 changed files with 949 additions and 538 deletions.
4 changes: 3 additions & 1 deletion VXMusic/Overlay/VXMMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ namespace VXMusic.Overlay
{
public static class VXMMessage
{
public const string VxMusicHeartbeatPipeName = "VXMusicHeartbeatMessagePipe";

public const string CONNECTION_HEARTBEAT_REQUEST = "VX_HEARTBEAT_REQ";
public const string CONNECTION_HEARTBEAT_ACKNOWLEDGE = "VX_HEARTBEAT_ACK";

Expand All @@ -14,7 +16,7 @@ public static class VXMMessage
public const string RECOGNITION_REQUEST = "VX_RECOGNITION_REQ";
public const string RECOGNITION_ACKNOWLEDGE = "VX_RECOGNITION_ACK";
public const string RECOGNITION_FINISH = "VX_RECOGNITION_FIN";

public const string ENABLE_OVERLAY_ANCHOR_LEFTHAND_REQUEST = "VX_OVERLAY_ANCHOR_LEFTHAND_REQ";
public const string ENABLE_OVERLAY_ANCHOR_LEFTHAND_ACKNOWLEDGE = "VX_OVERLAY_ANCHOR_LEFTHAND_ACK";
public const string ENABLE_OVERLAY_ANCHOR_RIGHTHAND_REQUEST = "VX_OVERLAY_ANCHOR_RIGHTHAND_REQ";
Expand Down
24 changes: 0 additions & 24 deletions VXMusic/Overlay/VXMusicOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ public void SendNotification(string title, string content, int timeout, string i
{
vxMusicOverlay.SendNotificationInternal(title, content, timeout, image);
}
public void SetLeftOverlayTrackedDevice()
{
_logger.LogInformation("Setting Overlay tracked device to: Left Hand");
vxMusicOverlay.SetOverlayTrackedDeviceInternal(TrackedDeviceRole.LeftHand);
}

public void SetRightHandOverlayTrackedDevice()
{
_logger.LogInformation("Setting Overlay tracked device to: Right Hand");
vxMusicOverlay.SetOverlayTrackedDeviceInternal(TrackedDeviceRole.RightHand);
}

public TrackedDeviceRole GetOverlayTrackedDevice()
{
Expand Down Expand Up @@ -158,19 +147,6 @@ public void SendNotificationInternal(string title, string content, int timeout,
//Marshal.FreeHGlobal(finalBitmap); //TODO NEED THIS
}

public void SetOverlayTrackedDeviceInternal(TrackedDeviceRole trackedDeviceRole)
{
try
{
TrackedDevice = trackedDeviceRole;
}
catch (Exception e)
{
_logger.LogWarning("VR Device was not found, are any controllers turned on?");
return;
}
}

public static NotificationBitmap_t NotificationBitmapFromBitmap(Bitmap bmp, bool flipRnB = true)
{
return NotificationBitmapFromBitmapData(BitmapDataFromBitmap(bmp, flipRnB));
Expand Down
1 change: 1 addition & 0 deletions VXMusic/VXMusic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>none</DebugType>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions VXMusicDesktop/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ public App() : base()
Logger.LogTrace($"Booting VXMusic Desktop Client...");

VXMusicSession.Initialise();

VXMusicOverlayInterface.StartVXMusicDesktopEventListener();


VXMusicSession.NotificationClient.SendNotification("Welcome to VXMusic!", "", 5);
}

Expand Down
Binary file added VXMusicDesktop/Images/LeftHandIconDisabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added VXMusicDesktop/Images/LeftHandIconEnabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added VXMusicDesktop/Images/RightHandIconDisabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added VXMusicDesktop/Images/RightHandIconEnabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions VXMusicDesktop/MVVM/ViewModel/OverlayViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,11 @@ public void SetEnableOverlayOnLeftHand(object commandParameter)
{
VXMusicOverlayInterface.SendOverlayAnchorUpdateRequest(
VXMMessage.ENABLE_OVERLAY_ANCHOR_LEFTHAND_REQUEST);

VXUserSettings.Overlay.SetOverlayAnchor(VXMusicOverlayAnchor.LeftHand);
App.VXMusicSession.OverlaySettings.OverlayAnchor = VXMusicOverlayAnchor.LeftHand;
}

public void SetEnableOverlayOnRightHand(object commandParameter)
{
VXMusicOverlayInterface.SendOverlayAnchorUpdateRequest(VXMMessage.ENABLE_OVERLAY_ANCHOR_RIGHTHAND_REQUEST);

VXUserSettings.Overlay.SetOverlayAnchor(VXMusicOverlayAnchor.RightHand);
App.VXMusicSession.OverlaySettings.OverlayAnchor = VXMusicOverlayAnchor.RightHand;
}
}
}
Loading

0 comments on commit 6e91885

Please sign in to comment.