diff --git a/VSCView/MainForm.cs b/VSCView/MainForm.cs index e965cd4..7b5fa70 100644 --- a/VSCView/MainForm.cs +++ b/VSCView/MainForm.cs @@ -157,6 +157,9 @@ private void LoadControllers(bool firstload) case SteamController.EConnectionType.BT: itm.Image = Properties.Resources.icon_bt; break; + case SteamController.EConnectionType.Chell: + itm.Image = Properties.Resources.icon_chell; + break; } // load the first controller in the list if it exists diff --git a/VSCView/OSD.cs b/VSCView/OSD.cs index fb29264..5ba5989 100644 --- a/VSCView/OSD.cs +++ b/VSCView/OSD.cs @@ -181,6 +181,20 @@ public bool GetBasicControl(string inputName) case "rightpadclick": case "rpc": return state.Buttons.RightPadClick; + + case "touch0": + case "touchnw": + return state.Buttons.Touch0; + case "touch1": + case "touchne": + return state.Buttons.Touch1; + case "touch2": + case "touchsw": + return state.Buttons.Touch2; + case "touch3": + case "touchse": + return state.Buttons.Touch3; + default: return false; } diff --git a/VSCView/Properties/AssemblyInfo.cs b/VSCView/Properties/AssemblyInfo.cs index b370b0d..f40809a 100644 --- a/VSCView/Properties/AssemblyInfo.cs +++ b/VSCView/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.1.7")] -[assembly: AssemblyFileVersion("0.3.1.7")] +[assembly: AssemblyVersion("0.3.1.8")] +[assembly: AssemblyFileVersion("0.3.1.8")] diff --git a/VSCView/Properties/Resources.Designer.cs b/VSCView/Properties/Resources.Designer.cs index 83df970..0404cb9 100644 --- a/VSCView/Properties/Resources.Designer.cs +++ b/VSCView/Properties/Resources.Designer.cs @@ -70,6 +70,16 @@ internal static System.Drawing.Bitmap icon_bt { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap icon_chell { + get { + object obj = ResourceManager.GetObject("icon_chell", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/VSCView/Properties/Resources.resx b/VSCView/Properties/Resources.resx index 3d07f2b..c34358a 100644 --- a/VSCView/Properties/Resources.resx +++ b/VSCView/Properties/Resources.resx @@ -130,4 +130,7 @@ ..\Resources\Nielk1_eyes_128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon_chell.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/VSCView/RawForm.Designer.cs b/VSCView/RawForm.Designer.cs index b43c0dd..aae781b 100644 --- a/VSCView/RawForm.Designer.cs +++ b/VSCView/RawForm.Designer.cs @@ -45,7 +45,7 @@ private void InitializeComponent() this.txtUpdate.Multiline = true; this.txtUpdate.Name = "txtUpdate"; this.txtUpdate.ReadOnly = true; - this.txtUpdate.Size = new System.Drawing.Size(738, 840); + this.txtUpdate.Size = new System.Drawing.Size(721, 840); this.txtUpdate.TabIndex = 0; this.txtUpdate.Text = resources.GetString("txtUpdate.Text"); // @@ -57,7 +57,7 @@ private void InitializeComponent() this.txtDevicePath.Location = new System.Drawing.Point(12, 8); this.txtDevicePath.Name = "txtDevicePath"; this.txtDevicePath.ReadOnly = true; - this.txtDevicePath.Size = new System.Drawing.Size(738, 20); + this.txtDevicePath.Size = new System.Drawing.Size(721, 20); this.txtDevicePath.TabIndex = 1; // // txtDescription @@ -68,7 +68,7 @@ private void InitializeComponent() this.txtDescription.Location = new System.Drawing.Point(12, 34); this.txtDescription.Name = "txtDescription"; this.txtDescription.ReadOnly = true; - this.txtDescription.Size = new System.Drawing.Size(738, 20); + this.txtDescription.Size = new System.Drawing.Size(721, 20); this.txtDescription.TabIndex = 2; // // txtBattery @@ -80,7 +80,7 @@ private void InitializeComponent() this.txtBattery.Multiline = true; this.txtBattery.Name = "txtBattery"; this.txtBattery.ReadOnly = true; - this.txtBattery.Size = new System.Drawing.Size(738, 166); + this.txtBattery.Size = new System.Drawing.Size(721, 166); this.txtBattery.TabIndex = 3; this.txtBattery.Text = "00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00"; // @@ -93,7 +93,7 @@ private void InitializeComponent() this.txtConnection.Multiline = true; this.txtConnection.Name = "txtConnection"; this.txtConnection.ReadOnly = true; - this.txtConnection.Size = new System.Drawing.Size(738, 112); + this.txtConnection.Size = new System.Drawing.Size(721, 112); this.txtConnection.TabIndex = 4; this.txtConnection.Text = "00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00\r\n00"; // diff --git a/VSCView/RawForm.cs b/VSCView/RawForm.cs index d018b3c..7d3301b 100644 --- a/VSCView/RawForm.cs +++ b/VSCView/RawForm.cs @@ -90,6 +90,7 @@ private void GetHidDevice() _device.MonitorDeviceEvents = true; + _attached = true; _device.ReadReport((_data) => OnReport(_device, _data)); //_device.Read((_data) => OnRead(_device, _data)); } diff --git a/VSCView/Resources/icon_chell.png b/VSCView/Resources/icon_chell.png new file mode 100644 index 0000000..b0cbfbd Binary files /dev/null and b/VSCView/Resources/icon_chell.png differ diff --git a/VSCView/SteamController.cs b/VSCView/SteamController.cs index e6a1c4e..f22ef09 100644 --- a/VSCView/SteamController.cs +++ b/VSCView/SteamController.cs @@ -12,6 +12,7 @@ public class SteamController private const int VendorId = 0x28DE; // 10462 private const int ProductIdWireless = 0x1142; // 4418; private const int ProductIdWired = 0x1102; // 4354 + private const int ProductIdChell = 0x1101; // 4353 //private const int ProductIdBT = 0x1106; // 4358 public bool SensorsEnabled; @@ -82,6 +83,11 @@ public class SteamControllerButtons : ICloneable public bool RightPadTouch { get; set; } public bool RightPadClick { get; set; } + public bool Touch0 { get; set; } + public bool Touch1 { get; set; } + public bool Touch2 { get; set; } + public bool Touch3 { get; set; } + public virtual object Clone() { SteamControllerButtons buttons = (SteamControllerButtons)base.MemberwiseClone(); @@ -115,6 +121,11 @@ public virtual object Clone() buttons.RightPadTouch = RightPadTouch; buttons.RightPadClick = RightPadClick; + buttons.Touch0 = Touch0; + buttons.Touch1 = Touch1; + buttons.Touch2 = Touch2; + buttons.Touch3 = Touch3; + return buttons; } } @@ -190,6 +201,7 @@ public enum EConnectionType Wireless, USB, BT, + Chell, } SteamControllerState State = new SteamControllerState(); @@ -320,7 +332,7 @@ public string GetDevicePath() public static SteamController[] GetControllers() { - List _devices = HidDevices.Enumerate(VendorId, ProductIdWireless, ProductIdWired/*, ProductIdBT*/).ToList(); + List _devices = HidDevices.Enumerate(VendorId, ProductIdWireless, ProductIdWired/*, ProductIdBT*/, ProductIdChell).ToList(); List ControllerList = new List(); string wired_m = "&pid_1102&mi_02"; //string dongle_m = "&pid_1142&mi_01"; @@ -329,6 +341,7 @@ public static SteamController[] GetControllers() string dongle_m3 = "&pid_1142&mi_03"; string dongle_m4 = "&pid_1142&mi_04"; //string bt_m = "_PID&1106_"; + string chell_m = "&pid_1101"; // we should never have holes, this entire dictionary is just because I don't know if I can trust the order I get the HID devices for (int i = 0; i < _devices.Count; i++) { @@ -348,10 +361,14 @@ public static SteamController[] GetControllers() { ControllerList.Add(new SteamController(_device, EConnectionType.Wireless)); } - //else// if (bt_m.Contains(bt_m)) + //else// if (devicePath.Contains(bt_m)) //{ // ControllerList.Add(new SteamController(_device, EConnectionType.BT)); //} + else if (devicePath.Contains(chell_m)) + { + ControllerList.Add(new SteamController(_device, EConnectionType.Chell)); + } } } @@ -424,6 +441,11 @@ private void OnReport(HidReport report) State.LeftTrigger = report.Data[11]; State.RightTrigger = report.Data[12]; + State.Buttons.Touch0 = (report.Data[14] & 0x01) == 0x01; + State.Buttons.Touch1 = (report.Data[14] & 0x02) == 0x02; + State.Buttons.Touch2 = (report.Data[14] & 0x04) == 0x04; + State.Buttons.Touch3 = (report.Data[14] & 0x08) == 0x08; + if (LeftAnalogMultiplexMode) { if (LeftPadTouch) diff --git a/VSCView/VSCView.csproj b/VSCView/VSCView.csproj index ddf9c0c..110587d 100644 --- a/VSCView/VSCView.csproj +++ b/VSCView/VSCView.csproj @@ -85,6 +85,9 @@ + + Always + Always @@ -454,5 +457,40 @@ Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + \ No newline at end of file diff --git a/VSCView/themes/default/base_chell.png b/VSCView/themes/default/base_chell.png new file mode 100644 index 0000000..44884fc Binary files /dev/null and b/VSCView/themes/default/base_chell.png differ diff --git a/VSCView/themes/default/btn-face_chell.png b/VSCView/themes/default/btn-face_chell.png new file mode 100644 index 0000000..7aa9df1 Binary files /dev/null and b/VSCView/themes/default/btn-face_chell.png differ diff --git a/VSCView/themes/default/btn-home_chell.png b/VSCView/themes/default/btn-home_chell.png new file mode 100644 index 0000000..1cb1af6 Binary files /dev/null and b/VSCView/themes/default/btn-home_chell.png differ diff --git a/VSCView/themes/default/btn-sub_chell.png b/VSCView/themes/default/btn-sub_chell.png new file mode 100644 index 0000000..fde594f Binary files /dev/null and b/VSCView/themes/default/btn-sub_chell.png differ diff --git a/VSCView/themes/default/btn-touch_chell.png b/VSCView/themes/default/btn-touch_chell.png new file mode 100644 index 0000000..17faee2 Binary files /dev/null and b/VSCView/themes/default/btn-touch_chell.png differ diff --git a/VSCView/themes/default/chell-all.json b/VSCView/themes/default/chell-all.json new file mode 100644 index 0000000..dfdeab0 --- /dev/null +++ b/VSCView/themes/default/chell-all.json @@ -0,0 +1,151 @@ +{ + "name": "Chell - All", + "width": 675, + "height": 774, + "children": [ + { + "type":"image", + "image":"base_chell.png", + "x":337.5, + "y":291, + "width":675, + "height":582, + "center":true, + "children": [ + { + "x":0, + "y":-15, + "children": [ + { "type":"showhide", "inputName":"a", "invert":false, "children": [ { "type":"image", "image":"btn-face_chell.png", "x": 100, "y": 56, "width": 37, "height":-43, "center":true } ] }, + { "type":"showhide", "inputName":"b", "invert":false, "children": [ { "type":"image", "image":"btn-face_chell.png", "x": 100, "y":-56, "width": 37, "height": 43, "center":true } ] }, + { "type":"showhide", "inputName":"x", "invert":false, "children": [ { "type":"image", "image":"btn-face_chell.png", "x":-100, "y": 56, "width":-37, "height":-43, "center":true } ] }, + { "type":"showhide", "inputName":"y", "invert":false, "children": [ { "type":"image", "image":"btn-face_chell.png", "x":-100, "y":-56, "width":-37, "height": 43, "center":true } ] } + ] + }, + + { + "x":0, + "y":-15, + "children": [ + { "type":"showhide", "inputName":"touch0", "invert":false, "children": [ { "type":"image", "image":"btn-touch_chell.png", "x":-37.5, "y":-37.5, "width":77, "height":77, "center":true } ] }, + { "type":"showhide", "inputName":"touch1", "invert":false, "children": [ { "type":"image", "image":"btn-touch_chell.png", "x": 37.5, "y":-37.5, "width":77, "height":77, "center":true } ] }, + { "type":"showhide", "inputName":"touch2", "invert":false, "children": [ { "type":"image", "image":"btn-touch_chell.png", "x":-37.5, "y": 37.5, "width":77, "height":77, "center":true } ] }, + { "type":"showhide", "inputName":"touch3", "invert":false, "children": [ { "type":"image", "image":"btn-touch_chell.png", "x": 37.5, "y": 37.5, "width":77, "height":77, "center":true } ] } + ] + }, + + { + "x":0, + "y":102, + "children": [ + { "type":"showhide", "inputName":"steam" , "invert":false, "children": [ { "type":"image", "image":"btn-home_chell.png", "x": 0, "y": 0, "width":150, "height":19, "center":true } ] }, + { "type":"showhide", "inputName":"start" , "invert":false, "children": [ { "type":"image", "image":"btn-sub_chell.png" , "x": 107, "y": 0, "width": 51, "height":19, "center":true } ] }, + { "type":"showhide", "inputName":"select", "invert":false, "children": [ { "type":"image", "image":"btn-sub_chell.png" , "x": -107, "y": 0, "width": 51, "height":19, "center":true } ] } + ] + }, + + { + "x":0, + "y":-230, + "children": [ + { "type":"showhide", "inputName":"lg", "invert":false, "children": [ { "type":"image", "image":"btn-trigger.png" , "x": -75, "y": 0, "width":50, "height":50, "center":true } ] }, + { "type":"showhide", "inputName":"lt", "invert":false, "children": [ { "type":"image", "image":"btn-trigger.png" , "x": -163, "y": 48, "width":50, "height":50, "center":true } ] }, + { "type":"showhide", "inputName":"lb", "invert":false, "children": [ { "type":"image", "image":"btn-trigger.png" , "x": -163, "y": -28, "width":50, "height":50, "center":true } ] }, + { "type":"showhide", "inputName":"rg", "invert":false, "children": [ { "type":"image", "image":"btn-trigger.png" , "x": 75, "y": 0, "width":50, "height":50, "center":true } ] }, + { "type":"showhide", "inputName":"rt", "invert":false, "children": [ { "type":"image", "image":"btn-trigger.png" , "x": 163, "y": 48, "width":50, "height":50, "center":true } ] }, + { "type":"showhide", "inputName":"rb", "invert":false, "children": [ { "type":"image", "image":"btn-trigger.png" , "x": 163, "y": -28, "width":50, "height":50, "center":true } ] } + ] + }, + + { "type":"showhide", "inputName":"rightpadclick", "invert":false, "children": [ { "type":"image", "image":"btn-haptic.png", "x": 171, "y": -17, "width":156, "height":160, "center":true } ] }, + { + "x": 171, + "y": -17, + "rot":-15, + "children": [ + { + "type":"trailpad", + "inputName":"rightpadtouch", + "x": 0, + "y": 0, + "axisNameX":"rightpadx", + "axisNameY":"rightpady", + "scaleFactorX": 0.0022, + "scaleFactorY": 0.0022, + "image":"padheat.png", + "length":30, + "width":36, + "height":36, + "children": [ + { "type":"showhide", "inputName":"rightpadtouch", "invert":false, "children": [ { "type":"image", "image":"btn-face.png", "x": 0, "y": 0, "width":36, "height":36, "center":true } ] } + ] + } + ] + }, + + { "type":"showhide", "inputName":"leftpadclick" , "invert":false, "children": [ { "type":"image", "image":"btn-haptic.png", "x": -171, "y": -17, "width":156, "height":160, "center":true } ] }, + { + "x": -171, + "y": -17, + "rot": 15, + "children": [ + { + "type":"trailpad", + "inputName":"leftpadtouch", + "x": 0, + "y": 0, + "axisNameX":"leftpadx", + "axisNameY":"leftpady", + "scaleFactorX": 0.0022, + "scaleFactorY": 0.0022, + "image":"padheat.png", + "length":30, + "width":36, + "height":36, + "children": [ + { "type":"showhide", "inputName":"leftpadtouch", "invert":false, "children": [ { "type":"image", "image":"btn-face.png", "x": 0, "y": 0, "width":36, "height":36, "center":true } ] } + ] + } + ] + }, + + { + "x":0, + "y":370, + "children": [ + { + "type":"basic3d1", + "x": 165, + "y": 0, + "width":111, + "height":71, + "mode": "accel", + "image":"gyro_chell.png", + "shadowl":"gyro_chell_l.png", + "shadowr":"gyro_chell_r.png", + "shadowu":"gyro_chell_u.png", + "shadowd":"gyro_chell_d.png", + "tilttranslatex":55, + "tilttranslatey":40 + }, + { + "type":"basic3d1", + "x": -165, + "y": 0, + "width":111, + "height":71, + "mode": "gyro", + "image":"gyro_chell.png", + "shadowl":"gyro_chell_l.png", + "shadowr":"gyro_chell_r.png", + "shadowu":"gyro_chell_u.png", + "shadowd":"gyro_chell_d.png", + "tilttranslatex":55, + "tilttranslatey":40 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/VSCView/themes/default/gyro_chell.png b/VSCView/themes/default/gyro_chell.png new file mode 100644 index 0000000..fdbb2e7 Binary files /dev/null and b/VSCView/themes/default/gyro_chell.png differ diff --git a/VSCView/themes/default/gyro_chell_d.png b/VSCView/themes/default/gyro_chell_d.png new file mode 100644 index 0000000..2b0c430 Binary files /dev/null and b/VSCView/themes/default/gyro_chell_d.png differ diff --git a/VSCView/themes/default/gyro_chell_l.png b/VSCView/themes/default/gyro_chell_l.png new file mode 100644 index 0000000..14bda9c Binary files /dev/null and b/VSCView/themes/default/gyro_chell_l.png differ diff --git a/VSCView/themes/default/gyro_chell_r.png b/VSCView/themes/default/gyro_chell_r.png new file mode 100644 index 0000000..4e7c89c Binary files /dev/null and b/VSCView/themes/default/gyro_chell_r.png differ diff --git a/VSCView/themes/default/gyro_chell_u.png b/VSCView/themes/default/gyro_chell_u.png new file mode 100644 index 0000000..f51ea9e Binary files /dev/null and b/VSCView/themes/default/gyro_chell_u.png differ