@mcesystems/usb-device-listener 1.0.65 → 1.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npm install
|
|
|
32
32
|
|
|
33
33
|
## Quick Start
|
|
34
34
|
|
|
35
|
-
Examples below use `@mcesystems/tool-debug` for formatted logs.
|
|
35
|
+
Examples below use `@mcesystems/tool-debug-g4` for formatted logs.
|
|
36
36
|
|
|
37
37
|
```javascript
|
|
38
38
|
import usbListener from "usb-device-listener";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
logHeader,
|
|
43
43
|
logNamespace,
|
|
44
44
|
setLogLevel
|
|
45
|
-
} from "@mcesystems/tool-debug";
|
|
45
|
+
} from "@mcesystems/tool-debug-g4";
|
|
46
46
|
|
|
47
47
|
logNamespace("usb");
|
|
48
48
|
setLogLevel("debug");
|
|
@@ -172,7 +172,7 @@ Register callback for device connection events.
|
|
|
172
172
|
|
|
173
173
|
**Example:**
|
|
174
174
|
```javascript
|
|
175
|
-
import { logDataObject } from "@mcesystems/tool-debug";
|
|
175
|
+
import { logDataObject } from "@mcesystems/tool-debug-g4";
|
|
176
176
|
|
|
177
177
|
usbListener.onDeviceAdd((device) => {
|
|
178
178
|
const vidHex = device.vid.toString(16).toUpperCase().padStart(4, "0");
|
|
@@ -190,7 +190,7 @@ Register callback for device disconnection events. Device info format same as `o
|
|
|
190
190
|
|
|
191
191
|
**Example:**
|
|
192
192
|
```javascript
|
|
193
|
-
import { logDataObject } from "@mcesystems/tool-debug";
|
|
193
|
+
import { logDataObject } from "@mcesystems/tool-debug-g4";
|
|
194
194
|
|
|
195
195
|
usbListener.onDeviceRemove((device) => {
|
|
196
196
|
logDataObject("Device disconnected", {
|
|
@@ -207,7 +207,7 @@ Get list of all currently connected USB devices.
|
|
|
207
207
|
|
|
208
208
|
**Example:**
|
|
209
209
|
```javascript
|
|
210
|
-
import { logDataObject } from "@mcesystems/tool-debug";
|
|
210
|
+
import { logDataObject } from "@mcesystems/tool-debug-g4";
|
|
211
211
|
|
|
212
212
|
const devices = usbListener.listDevices();
|
|
213
213
|
devices.forEach((device) => {
|