Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/extras/lib/udev/rules.d/99-shuttle.rules
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ShuttleXpress USB jog pendant
# model "S-XPRS"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="0444"

# ShuttlePRO USB jog pendant
# model "SP-JNS"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="05f3", ATTRS{idProduct}=="0240", MODE="0444"

# ShuttlePROv2 USB jog pendant
# model "S-PROV2"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0030", MODE="0444"
19 changes: 14 additions & 5 deletions docs/man/man1/shuttle.1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
.TP \\$1
..
.SH NAME
shuttle \- control HAL pins with the ShuttleXpress or ShuttlePRO device made by Contour Design
shuttle \- control HAL pins with the ShuttleXpress, ShuttlePRO, and ShuttlePRO2 device made by Contour Design
.SH SYNOPSIS
\fIloadusr\fR \fBshuttle\fR \fI[DEVICE ...]\fR
.SH DESCRIPTION
shuttle is a non-realtime HAL component that interfaces Contour
Design's ShuttleXpress and ShuttlePRO devices with LinuxCNC's HAL.
Design's ShuttleXpress, ShuttlePRO, and ShuttlePRO2 devices with LinuxCNC's HAL.

.PP
If the driver is started without command-line arguments, it will probe all
Expand All @@ -28,6 +28,11 @@ The ShuttlePRO has 13 momentary buttons, a 10 counts/revolution
jog wheel with detents, and a 15-position spring-loaded outer wheel that
returns to center when released.

.PP
The ShuttlePRO2 has 15 momentary buttons, a 10 counts/revolution
jog wheel with detents, and a 15-position spring-loaded outer wheel that
returns to center when released.

.SH UDEV
The shuttle driver needs read permission to the Shuttle devices'
/dev/hidraw* device files. This can be accomplished by adding a file
Expand All @@ -37,9 +42,13 @@ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="04

SUBSYSTEM=="hidraw", ATTRS{idVendor}=="05f3", ATTRS{idProduct}=="0240", MODE="0444"

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

The LinuxCNC Debian package installs an appropriate udev file
automatically, but if you are building LinuxCNC from source and are not
using the Debian packaging, you'll need to install this file by hand.
If you install the file by hand you'll need to tell udev to reload its
rules files by running `udevadm control --reload-rules`.

.SH A warning about the Jog Wheel
The Shuttle devices have an internal 8-bit counter for the current
Expand All @@ -58,9 +67,9 @@ notice the first click.

.SH Pins

All HAL pin names are prefixed with the type of device followed by
the index of the device (the order in which the driver found them),
for example "shuttlexpress.0" or "shuttlepro.2".
All HAL pin names are prefixed with `shuttle` followed by the index
of the device (the order in which the driver found them), for example
"shuttle.0" or "shuttle.2".

.TP
(bit out) \fI(prefix).button-(number)\fR
Expand Down
15 changes: 11 additions & 4 deletions docs/src/drivers/shuttle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
== Description

Shuttle is a non-realtime HAL component that interfaces Contour Design’s
ShuttleXpress and ShuttlePRO devices with LinuxCNC’s HAL.
ShuttleXpress, ShuttlePRO, and ShuttlePRO2 devices with LinuxCNC’s HAL.

If the driver is started without command-line arguments, it will probe
all /dev/hidraw* device files for Shuttle devices, and use all devices
Expand All @@ -20,6 +20,10 @@ The ShuttlePRO has 13 momentary buttons, a 10 counts/revolution jog
wheel with detents, and a 15-position spring-loaded outer wheel that
returns to center when released.

The ShuttlePRO2 has 15 momentary buttons, a 10 counts/revolution jog
wheel with detents, and a 15-position spring-loaded outer wheel that
returns to center when released.

[WARNING]
=====
The Shuttle devices have an internal 8-bit counter for the current
Expand Down Expand Up @@ -47,18 +51,21 @@ device files. This can be accomplished by adding a file
----
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="0444"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="05f3", ATTRS{idProduct}=="0240", MODE="0444"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0030", MODE="0444"
----

The LinuxCNC Debian package installs an appropriate udev file
automatically, but if you are building LinuxCNC from source and are not
using the Debian packaging you'll need to install this file by hand.
If you install the file by hand you'll need to tell udev to reload its
rules files by running `udevadm control --reload-rules`.


== Pins

All HAL pin names are prefixed with the type of device followed by
the index of the device (the order in which the driver found them),
for example "shuttlexpress.0" or "shuttlepro.2".
All HAL pin names are prefixed with `shuttle` followed by the index
of the device (the order in which the driver found them), for example
"shuttle.0" or "shuttle.2".

'<Prefix>.button-<ButtonNumber>' (bit out)::

Expand Down
8 changes: 4 additions & 4 deletions src/hal/user_comps/shuttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This is a userspace HAL driver for the ShuttleXpress and ShuttlePRO
// devices by Contour Design.
//
// Copyright 2011, 2016 Sebastian Kuzminsky <seb@highlab.com>
// Copyright 2011, 2016, 2021 Sebastian Kuzminsky <seb@highlab.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -48,7 +48,7 @@

#define Max(a, b) ((a) > (b) ? (a) : (b))

#define MAX_BUTTONS 13
#define MAX_BUTTONS 15


typedef struct {
Expand Down Expand Up @@ -80,8 +80,8 @@ contour_dev_t contour_dev[] = {
.name = "shuttleproV2",
.vendor_id = 0x0b33,
.product_id = 0x0030,
.num_buttons = 13,
.button_mask = { 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000 }
.num_buttons = 15,
.button_mask = { 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }
}
};

Expand Down