From ddffdc668cf6af318d23e1fde049c3efcd01d7ee Mon Sep 17 00:00:00 2001 From: Craig Dean Date: Tue, 20 Feb 2024 01:26:27 +0000 Subject: [PATCH] Fix #10 * Corrected `Control.IsUpDown` * fixed minor typo in Readme.md * Added `.vscode` to `.gitignore` --- .gitignore | 3 +++ HIDDevices/Control.cs | 2 +- readme.md | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8ec8135..a146fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,9 @@ bld/ [Oo]bj/ [Ll]og/ +# VSCode settings +.vscode + # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot diff --git a/HIDDevices/Control.cs b/HIDDevices/Control.cs index 898bcca..be0f46c 100644 --- a/HIDDevices/Control.cs +++ b/HIDDevices/Control.cs @@ -179,7 +179,7 @@ internal Control(Device device, DataValue value, int index) /// /// if this control is an up/down; otherwise, . /// A 0 means down and a 1 means up, otherwise the value should remain in between (0.5). - public bool IsUpDown => DataItem.ExpectedUsageType == ExpectedUsageType.OneShot; + public bool IsUpDown => DataItem.ExpectedUsageType == ExpectedUsageType.UpDown; /// /// Gets the button number, if a button; otherwise . diff --git a/readme.md b/readme.md index d436d4a..b093fe7 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ [![Nuget](https://img.shields.io/nuget/v/HIDDevices)](https://www.nuget.org/packages/HIDDevices/) # Description -This library provides a cross-platform service for asynchronously accessing HID devices, such as Gamepads, Joysticks and Multi-axis controllers and programmable button pads. It support Plug & Play, correctly identifying when controllers are added and removed, and Reactive frameworks. It also allows the creation of custom Controller implementations which are matched automatically against devices for easy use. +This library provides a cross-platform service for asynchronously accessing HID devices, such as Gamepads, Joysticks and Multi-axis controllers and programmable button pads. It supports Plug & Play, correctly identifying when controllers are added and removed, and Reactive frameworks. It also allows the creation of custom Controller implementations which are matched automatically against devices for easy use. ## Important Notes * The project is currently based on [HIDSharp](https://www.zer7.com/software/hidsharp), but deliberately does not expose any of its library explicitly as it may well be replaced in future.