📄 hal_joystick.1
字号:
.\" Copyright (c) 2006 John Kasunich.\" (jmkasunich AT users DOT sourceforge DOT net).\".\" This is free documentation; you can redistribute it and/or.\" modify it under the terms of the GNU General Public License as.\" published by the Free Software Foundation; either version 2 of.\" the License, or (at your option) any later version..\".\" The GNU General Public License's references to "object code".\" and "executables" are to be interpreted as the output of any.\" document formatting or typesetting system, including.\" intermediate and printed output..\".\" This manual is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the.\" GNU General Public License for more details..\".\" You should have received a copy of the GNU General Public.\" License along with this manual; if not, write to the Free.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,.\" USA..\".\".\".TH HAL_JOYSTICK "1" "2006-03-13" "EMC Documentation" "HAL User's Manual".SH NAMEhal_joystick \- \fB(DEPRECATED)\fR control HAL pins with a joystick.SH SYNOPSIS\fBhal_joystick\fR [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIprefix\fR].SH DESCRIPTION\fBhal_joystick\fR is \fBdeprecated\fR. Use \fBhal_input(1)\fR instead.\fBhal_joystick\fR will be removed from a future version of emc.\fBhal_joystick\fR allows a joystick to generate HAL (Hardware AbstractionLayer) signals. Although not a hard realtime component, it is quite responsive under moderate system load. It provides analog (float) HALpins for each joystick axis, and digital (bit) pins for each joystickbutton or trigger..SH OPTIONS.TP\fB-d\fR \fIdevice\fRuse \fIdevice\fR as the joystick device (default is /dev/input/js0)..TP\fB-p\fR \fIprefix\fRuse \fIprefix\fR for the HAL pin names (default is "joystick.0")..SH USAGE\fBhal_joystick\fR runs forever until interrupted with SIGINT or SIGTERM.Normally it would be invoked as \fBhal_joystick &\fR to run in the background.For each joystick axis, it exports a HAL float pin called "<prefix>.axis.<N>" where N is an integer, starting at zero. The value of the pin will range from-1.0 to +1.0 as the axis is moved thru its range of motion.For each joystick button, it exports a HAL bit pin called "<prefix>.button.<M>"where M is also an integer starting at zero.The mapping of axis and buttons to N and M are joystick dependent, as is thedirection of motion that results in positive values of the axis pin.\fBhal_joystick\fR uses the numbering and direction that is reported by theLinux joystick driver. For modern USB or other digital joysticks, the Linuxdriver figures out the number of axis and buttons automatically. For older analog joysticks, the driver may need configured by the user. See Linuxdocumentation for more details. Once the Linux driver is properly configured,the HAL driver will configure itself to match automatically..SH "SEE ALSO"\fBhal_input(1)\fR.SH BUGShal_joystick is incompatible with the way that halcmd waits for components tobe ready. This leads to race conditions when connecting signals tohal_joystick's pins.Perhaps the analog axes should have a "scale" parameter that could be usedto scale the -1.0 to +1.0 range to whatever the user needs. It would alsoallow the direction of an axis to be reversed by using a negative scale.This can already be done using a HAL scale block, but a built-in scale parameter would be more convenient..SH AUTHORWritten by John Kasunich, as part of the Enhanced MachineController (EMC) project..SH REPORTING BUGSReport bugs to jmkasunich AT users DOT sourceforge DOT net.SH COPYRIGHTCopyright \(co 2003 John Kasunich..brThis is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -