Skip to content

Commit ce3dfd4

Browse files
authored
Merge pull request #1 from checksummaster/checksummaster-patch-1
Add old shuttle pro (aka V1)
2 parents 38083b6 + 2a189e2 commit ce3dfd4

6 files changed

Lines changed: 1246 additions & 442 deletions

File tree

99-Shuttle.rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0010", MODE="0666"
2+
13
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="0666"
24

35
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0030", MODE="0666"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ShuttleControlUSB
22

3-
_A Library to use Contour Design ShuttleXpress and ShuttlePro v2 in Node.js projects without the driver._
3+
_A Library to use Contour Design ShuttleXpress and ShuttlePro (v1 and v2) in Node.js projects without the driver._
44

55
## Installation
66
```sh
@@ -24,7 +24,7 @@ shuttle.start();
2424
### Methods
2525
`start()`
2626

27-
Starts the service and monitors USB device connections for ShuttleXPress or ShuttlePro v2. It will find the first device connected. Only one device is supported at a time.
27+
Starts the service and monitors USB device connections for ShuttleXPress or ShuttlePro (v1 and v2). It will find the first device connected. Only one device is supported at a time.
2828

2929
This should be called after the 'connect' event listener has been declared, otherwise already-connected devices will not be detected.
3030

@@ -41,7 +41,7 @@ Emitted when a device has been plugged into a USB port.
4141

4242
Returns:
4343
- `deviceInfo` Object
44-
- `name` String - name of the device ('ShuttleXpress' or 'ShuttlePro v2')
44+
- `name` String - name of the device ('ShuttleXpress', 'ShuttlePro v1', or 'ShuttlePro v2')
4545
- `hasShuttle` Boolean
4646
- `hasJog` Boolean
4747
- `numButtons` Integer
@@ -53,7 +53,7 @@ Emitted when the device has been unplugged or has failed.
5353
Emitted when shuttle data is available from the device.
5454

5555
Returns:
56-
- `value` Integer - Range from -7 to 7 for ShuttleXpress and ShuttlePro v2
56+
- `value` Integer - Range from -7 to 7 for ShuttleXpress and ShuttlePro (v1 and v2)
5757

5858
#### Event: `shuttle-trans`
5959
Emitted when shuttle data is available from the device.
@@ -66,7 +66,7 @@ Returns:
6666
Emitted when jog data is available from the device.
6767

6868
Returns:
69-
- `value` Integer - Range from 0 to 255 for ShuttleXpress and ShuttlePro v2
69+
- `value` Integer - Range from 0 to 255 for ShuttleXpress and ShuttlePro (v1 and v2)
7070

7171
#### Event: `jog-dir`
7272
Emitted when jog data is available from the device.
@@ -88,7 +88,7 @@ Returns:
8888

8989

9090
## Linux Note
91-
By default, the udev system adds ShuttleXpress and ShuttlePro V2 as root only access. To fix this, you need to copy 99-Shuttle.rules to:
91+
By default, the udev system adds ShuttleXpress, ShuttlePro V1, and ShuttlePro V2 as root only access. To fix this, you need to copy 99-Shuttle.rules to:
9292
```
9393
/etc/udev/rules.d
9494
```

lib/ShuttleDefs.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ module.exports = [
2323
},
2424
buttonMasks: [0x0010, 0x0020, 0x0040, 0x0080, 0x0100]
2525
},
26+
{
27+
name: 'ShuttlePro v1',
28+
vendor: 'Contour Design, Inc.',
29+
vid: 0x0b33,
30+
did: 0x0010,
31+
packetSize: 5,
32+
rules: {
33+
shuttle: {
34+
offset: 0,
35+
type: "int8"
36+
},
37+
jog: {
38+
offset: 1,
39+
type: "uint8"
40+
},
41+
buttons: {
42+
offset: 3,
43+
type: "uint16le"
44+
}
45+
},
46+
buttonMasks: [0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000]
47+
},
2648
{
2749
name: 'ShuttlePro v2',
2850
vendor: 'Contour Design, Inc.',

0 commit comments

Comments
 (0)