Skip to content

Commit

Permalink
Add HMDCharging to OSC Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey004 committed Jan 13, 2025
1 parent f7e41da commit cc8369b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
21 changes: 20 additions & 1 deletion Quest2-VRC.GUI/OSCTest.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions Quest2-VRC.GUI/OSCTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public OSCTest()

private void Form2_Load(object sender, EventArgs e)
{

materialSlider1.Text = (string)Global.HMDBat;
materialSlider2.Text = (string)Global.ControllerBatL;
materialSlider3.Text = (string)Global.ControllerBatR;
}
private void materialSlider1_onValueChanged(object sender, int newValue)
{


string HMDBat = (string)Global.HMDBat;
VRChatMessage Msg_emu1 = new VRChatMessage(HMDBat, (float)newValue / 100);
Expand All @@ -39,7 +39,7 @@ private void materialSlider1_onValueChanged(object sender, int newValue)

private void materialSlider2_onValueChanged(object sender, int newValue)
{


string ControllerBatL = (string)Global.ControllerBatL;
VRChatMessage Msg_emu2 = new VRChatMessage(ControllerBatL, (float)newValue / 100);
Expand All @@ -48,7 +48,7 @@ private void materialSlider2_onValueChanged(object sender, int newValue)

private void materialSlider3_onValueChanged(object sender, int newValue)
{


string ControllerBatR = (string)Global.ControllerBatR; ;
VRChatMessage Msg_emu3 = new VRChatMessage(ControllerBatR, (float)newValue / 100);
Expand All @@ -70,7 +70,7 @@ private void materialSlider4_onValueChanged(object sender, int newValue)
}
private void Form2_FormClosing(object sender, FormClosingEventArgs e)
{

string HMDBat = (string)Global.HMDBat;
string ControllerBatL = (string)Global.ControllerBatL;
string ControllerBatR = (string)Global.ControllerBatR;
Expand All @@ -79,7 +79,8 @@ private void Form2_FormClosing(object sender, FormClosingEventArgs e)
VRChatMessage Msg_emu3 = new VRChatMessage(ControllerBatR, 0f);
VRChatMessage Msg_emu4 = new VRChatMessage("WifiRSSI", 0f);
VRChatMessage Msg_emu5 = new VRChatMessage("LowHMDBat", false);
SendPacket(Msg_emu1, Msg_emu2, Msg_emu3, Msg_emu4, Msg_emu5);
VRChatMessage Msg_emu6 = new VRChatMessage("HMDCharging", false);
SendPacket(Msg_emu1, Msg_emu2, Msg_emu3, Msg_emu4, Msg_emu5, Msg_emu6);
}

private void materialButton1_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -114,6 +115,10 @@ private void materialButton2_Click(object sender, EventArgs e)

}


private void materialCheckbox2_CheckedChanged(object sender, EventArgs e)
{
VRChatMessage Msg_emu6 = new VRChatMessage("HMDCharging", materialCheckbox2.Checked);
SendPacket(Msg_emu6);
}
}
}
4 changes: 2 additions & 2 deletions Quest2-VRC.GUI/OSCTest.resx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
Expand Down Expand Up @@ -48,7 +48,7 @@
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
Expand Down

0 comments on commit cc8369b

Please sign in to comment.