You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
| 2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
| 2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
| 2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
|
From: <sk...@us...> - 2011-03-30 21:30:28
|
Revision: 2410
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2410&view=rev
Author: skitt
Date: 2011-03-30 21:30:19 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Add licenses and documentation.
Added Paths:
-----------
trunk/COPYING
trunk/COPYING-1
trunk/README
Added: trunk/COPYING
===================================================================
--- trunk/COPYING (rev 0)
+++ trunk/COPYING 2011-03-30 21:30:19 UTC (rev 2410)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Added: trunk/COPYING-1
===================================================================
--- trunk/COPYING-1 (rev 0)
+++ trunk/COPYING-1 2011-03-30 21:30:19 UTC (rev 2410)
@@ -0,0 +1,251 @@
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 1, February 1989
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The license agreements of most software companies try to keep users
+at the mercy of those companies. By contrast, our General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. The
+General Public License applies to the Free Software Foundation's
+software and to any other program whose authors commit to using it.
+You can use it for your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Specifically, the General Public License is designed to make
+sure that you have the freedom to give away or sell copies of free
+software, that you receive source code or can get it if you want it,
+that you can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of a such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must tell them their rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any program or other work which
+contains a notice placed by the copyright holder saying it may be
+distributed under the terms of this General Public License. The
+"Program", below, refers to any such program or work, and a "work based
+on the Program" means either the Program or any work containing the
+Program or a portion of it, either verbatim or with modifications. Each
+licensee is addressed as "you".
+
+ 1. You may copy and distribute verbatim copies of the Program's source
+code as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this
+General Public License and to the absence of any warranty; and give any
+other recipients of the Program a copy of this General Public License
+along with the Program. You may charge a fee for the physical act of
+transferring a copy.
+
+ 2. You may modify your copy or copies of the Program or any portion of
+it, and copy and distribute such modifications under the terms of Paragraph
+1 above, provided that you also do the following:
+
+ a) cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change; and
+
+ b) cause the whole of any work that you distribute or publish, that
+ in whole or in part contains the Program or any part thereof, either
+ with or without modifications, to be licensed at no charge to all
+ third parties under the terms of this General Public License (except
+ that you may choose to grant warranty protection to some or all
+ third parties, at your option).
+
+ c) If the modified program normally reads commands interactively when
+ run, you must cause it, when started running for such interactive use
+ in the simplest and most usual way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the program under these
+ conditions, and telling the user how to view a copy of this General
+ Public License.
+
+ d) You may charge a fee for the physical act of transferring a
+ copy, and you may at your option offer warranty protection in
+ exchange for a fee.
+
+Mere aggregation of another independent work with the Program (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other work under the scope of these terms.
+
+ 3. You may copy and distribute the Program (or a portion or derivative of
+it, under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+ a) accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ b) accompany it with a written offer, valid for at least three
+ years, to give any third party free (except for a nominal charge
+ for the cost of distribution) a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ c) accompany it with the information you received as to where the
+ corresponding source code may be obtained. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form alone.)
+
+Source code for a work means the preferred form of the work for making
+modifications to it. For an executable file, complete source code means
+all the source code for all modules it contains; but, as a special
+exception, it need not include source code for modules which are standard
+libraries that accompany the operating system on which the executable
+file runs, or for standard header files or definitions files that
+accompany that operating system.
+
+ 4. You may not copy, modify, sublicense, distribute or transfer the
+Program except as expressly provided under this General Public License.
+Any attempt otherwise to copy, modify, sublicense, distribute or transfer
+the Program is void, and will automatically terminate your rights to use
+the Program under this License. However, parties who have received
+copies, or rights to use copies, from you under this General Public
+License will not have their licenses terminated so long as such parties
+remain in full compliance.
+
+ 5. By copying, distributing or modifying the Program (or any work based
+on the Program) you indicate your acceptance of this license to do so,
+and all its terms and conditions.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the original
+licensor to copy, distribute or modify the Program subject to these
+terms and conditions. You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein.
+
+ 7. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of the license which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+the license, you may choose any version ever published by the Free Software
+Foundation.
+
+ 8. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to humanity, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+ To do so, attach the following notices to the program. It is safest to
+attach them to the start of each source file to most effectively convey
+the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ 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
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ This program 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 program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19xx name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than `show w' and `show
+c'; they could even be mouse-clicks or menu items--whatever suits your
+program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ program `Gnomovision' (a program to direct compilers to make passes
+ at assemblers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+That's all there is to it!
Added: trunk/README
===================================================================
--- trunk/README (rev 0)
+++ trunk/README 2011-03-30 21:30:19 UTC (rev 2410)
@@ -0,0 +1,137 @@
+ linuxconsole tools
+ Release 1.4rc1
+
+
+This package contains the following utilities and associated
+documentation:
+* evtest - input layer event monitor
+* inputattach - connects legacy serial devices to the input layer
+* joystick utilities - calibrate and test joysticks and joypads
+
+The evtest and inputattach manpages provide more details on their
+operation.
+
+
+Joystick utilities
+------------------
+
+The following utilities are provided to calibrate and test joysticks:
+* ffcfstress, ffmvforce, fftest - test force-feedback devices
+* ffset - set force-feedback device parameters
+* jscal - calibrate joystick devices, reconfigure the axes and buttons
+* jscal-store, jscal-restore - store and retrieve joystick device
+ settings as configured using jscal
+* jstest - test joystick devices
+
+The typical scenario when configuring a new device is as follows:
+1. Check the basic functions using jstest (number of buttons, axes,
+ etc.).
+2. Calibrate the joystick using jscal (this can be useful even if the
+ device functions correctly, if only to configure the dead-zone at
+ the centre).
+3. Repeat steps 1 and 2 until the joystick is configured to the user's
+ satisfaction.
+4. Store the device's setup using jscal-store.
+
+
+Auto-loading inputattach and jscal-restore
+------------------------------------------
+
+udev can be used to start inputattach and jscal-restore when the
+appropriate device is connected to the system (or detected when the
+system is booting up).
+
+The following rule restores the stored calibration and axis/button
+mappings whenever a joystick device is connected:
+ KERNEL=="js*", ACTION=="add", RUN+="/usr/bin/jscal-restore %E{DEVNAME}"
+(change the path as appropriate). This rule needs /usr to be
+available, which can cause issues on systems where udev is run from
+the initramfs or where /usr is a separate partition. To work around
+this, the Debian package uses a script provided by Debian's udev
+package to wait for jscal-restore to become available. Should you wish
+to reproduce this, you need to create a udev agent
+(/lib/udev/jscal-restore) containing the following:
+
+#!/bin/sh -e
+# udev agent for jscal-restore
+
+wait_for_file() {
+ local file=$1
+ local count=120
+ while [ $count != 0 ]; do
+ [ -e "$file" ] && return 0
+ sleep 1
+ count=$(($count - 1))
+ done
+ exit 1
+}
+
+(
+ wait_for_file /usr/bin/jscal-restore
+ exec /usr/bin/jscal-restore $1
+) &
+
+and change the udev rule to
+ KERNEL=="js*", ACTION=="add", RUN+="/lib/udev/jscal-restore %E{DEVNAME}"
+
+The following rule forces flaky Acrux gamepads to stay awake:
+ KERNEL=="js*", ACTION=="add", ATTRS{name}=="ACRUX USB GAMEPAD 8116", RUN+="/bin/sleep 5000 < %p"
+(This should only be necessary on kernels older than 2.6.39-rc1.)
+
+The following rule configures a Mouse Systems mouse on the first
+serial port:
+ KERNEL=="ttyS0", ACTION=="add", RUN+="/usr/bin/inputattach --daemon -msc %p"
+If you need to wait for /usr you can adapt the recipe above.
+
+The following rules configures a Wacom W8001 devices on a Fujitsu
+T2010[2]:
+ SUBSYSTEM=="tty", KERNEL=="ttyS[0-9]*", ATTRS{id}=="FUJ02e5", ACTION=="add", RUN+="/usr/bin/inputattach --daemon --baud 19200 --w8001 /dev/%k"
+
+
+Contributors
+------------
+
+The following people have contributed to this release:
+* Johann Walles: jscal jitter tolerance.
+* Dr. László Kaján: button and axis remapping.
+* Sebastian Siewior: EVIOCGBIT correction.
+* Krzysztof A. Sobiecki: improvements to the button and axis remapping
+ functions.
+* Claudio Nieder: Sahara Touch-iT213 support.
+* Florian Fainelli: evtest fixes.
+* Alexander Clouter: W8001 support.
+* Roberto Neri: much discussion, and fixes and improvements to
+ jscal-store/jscal-restore and the udev rules given above.
+
+
+License
+-------
+
+The linuxconsole tools are
+ Copyright © 1996-2005 Vojtech Pavlik
+ Copyright © 2001 Romain Dolbeau
+ Copyright © 2001 Oliver Hamann
+ Copyright © 2001-2002 Johann Deneux
+ Copyright © 2001 Arndt Schoenewald
+ Copyright © 2008-2011 Stephen Kitt
+
+
+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
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version. (acceltest.c is provided only under
+the terms of version 1 of the License.)
+
+This program 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 program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA.
+
+
+The GNU General Public License version 1 is provided in the COPYING-1
+file; version 2 is provided in the COPYING file.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-30 20:19:16
|
Revision: 2409
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2409&view=rev
Author: skitt
Date: 2011-03-30 20:19:10 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Save the axis mapping before the calibration (thanks to Roberto Nero
<rn...@li...> for the patch!).
Modified Paths:
--------------
trunk/utils/jscal-store.in
Modified: trunk/utils/jscal-store.in
===================================================================
--- trunk/utils/jscal-store.in 2011-03-30 20:18:23 UTC (rev 2408)
+++ trunk/utils/jscal-store.in 2011-03-30 20:19:10 UTC (rev 2409)
@@ -14,6 +14,7 @@
if [ ! -x /sbin/udevadm ]; then
echo Storing joystick configuration requires udev! >&2
+ exit 1
fi
ident=$(mktemp)
@@ -53,8 +54,10 @@
if [ ! -z "$PRODUCT" ]; then
echo "PRODUCT=\"$PRODUCT\"" >> $STORE.new
fi
+# First store the axes mapping, then the calibration
+# as they must be restored in the same order
+jscal -q $1 | cut -d' ' -f-3 >> $STORE.new
jscal -p $1 | cut -d' ' -f-3 >> $STORE.new
-jscal -q $1 | cut -d' ' -f-3 >> $STORE.new
if [ -f $STORE ]; then
mv $STORE $STORE.old
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-30 20:18:30
|
Revision: 2408
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2408&view=rev
Author: skitt
Date: 2011-03-30 20:18:23 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Avoid using temporary files, and exit when errors occur (thanks to
Roberto Neri <rn...@li...> for the patch!).
Modified Paths:
--------------
trunk/utils/jscal-restore.in
Modified: trunk/utils/jscal-restore.in
===================================================================
--- trunk/utils/jscal-restore.in 2011-03-28 13:54:29 UTC (rev 2407)
+++ trunk/utils/jscal-restore.in 2011-03-30 20:18:23 UTC (rev 2408)
@@ -1,33 +1,59 @@
-#!/bin/sh
+#!/bin/bash
+if [ -z "$1" ]; then
+ echo "Usage: $0 {device}"
+ echo "Restores the device's calibration."
+ exit 1
+fi
+
if [ ! -x /sbin/udevadm ]; then
echo Restoring joystick configuration requires udev! >&2
+ exit 1
fi
-ident=$(mktemp)
-/sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
-. $ident
-rm -f $ident
-
STORE=/var/lib/joystick/joystick.state
-# Retrieve the applicable commands
-commands=$(mktemp)
-if [ -f $STORE ]; then
- if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then
- # Use the device name only
- @@PREFIX@@/share/joystick/extract kernel="$DEVICE" < $STORE > $commands
- else
- @@PREFIX@@/share/joystick/extract name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" < $STORE > $commands
- fi
+if [ ! -f $STORE ]; then
+ echo No saved joystick configuration\(s\) to restore! >&2
+ exit 1
fi
-# Run the commands if any
-if [ -f $commands ] && [ ! -z "$(cat $commands)" ]; then
- while read command; do
- $command $1
- done < $commands
+DEVICE=""
+NAME=""
+SERIAL=""
+VENDOR=""
+PRODUCT=""
+
+# Backup original $IFS (Internal Field Separator) variable
+OIFS=$IFS
+# Set $IFS to newline only as output from @@PREFIX@@/share/joystick/ident might contain spaces
+# in the NAME value
+IFS=$'\x0A'
+
+for ATTRIBUTE in $( /sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident ); do
+ ID=$( echo "$ATTRIBUTE" | cut -f 1 -d = )
+ VALUE=$( echo "$ATTRIBUTE" | cut -f 2 -d \" )
+ case $ID in
+ "DEVICE" ) DEVICE="$VALUE" ;;
+ "NAME" ) NAME="$VALUE" ;;
+ "SERIAL" ) SERIAL="$VALUE" ;;
+ "VENDOR" ) VENDOR="$VALUE" ;;
+ "PRODUCT" ) PRODUCT="$VALUE" ;;
+ esac
+done
+
+# Restore original $IFS
+IFS=$OIFS
+
+# Retrieve the applicable commands
+if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then
+ # Use the device name only
+ cat $STORE | @@PREFIX@@/share/joystick/extract kernel="$DEVICE" | while read COMMAND; do
+ $COMMAND $1
+ done
+else
+ cat $STORE | @@PREFIX@@/share/joystick/extract name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" | while read COMMAND; do
+ $COMMAND $1
+ done
fi
-# Delete the generated file
-rm -f $commands
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-28 13:54:35
|
Revision: 2407
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2407&view=rev
Author: skitt
Date: 2011-03-28 13:54:29 +0000 (Mon, 28 Mar 2011)
Log Message:
-----------
evtest does no show the fancy name for KEY_NUMERIC_* key events.
The patch attached below adds support for decoding these events.
Thanks to Florian Fainelli <f.f...@gm...> for the patch!
Modified Paths:
--------------
trunk/utils/evtest.c
Modified: trunk/utils/evtest.c
===================================================================
--- trunk/utils/evtest.c 2011-03-09 16:54:30 UTC (rev 2406)
+++ trunk/utils/evtest.c 2011-03-28 13:54:29 UTC (rev 2407)
@@ -225,6 +225,11 @@
[KEY_TWEN] = "TWEN", [KEY_DEL_EOL] = "Delete EOL",
[KEY_DEL_EOS] = "Delete EOS", [KEY_INS_LINE] = "Insert line",
[KEY_DEL_LINE] = "Delete line",
+ [KEY_NUMERIC_0] = "0", [KEY_NUMERIC_1] = "1",
+ [KEY_NUMERIC_2] = "2", [KEY_NUMERIC_3] = "3",
+ [KEY_NUMERIC_4] = "4", [KEY_NUMERIC_5] = "5",
+ [KEY_NUMERIC_6] = "6", [KEY_NUMERIC_7] = "7",
+ [KEY_NUMERIC_8] = "8", [KEY_NUMERIC_9] = "9",
};
char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-09 16:54:37
|
Revision: 2406
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2406&view=rev
Author: skitt
Date: 2011-03-09 16:54:30 +0000 (Wed, 09 Mar 2011)
Log Message:
-----------
Add jscal-store/restore, and provide an installation target in the Makefile.
Modified Paths:
--------------
trunk/utils/Makefile
Added Paths:
-----------
trunk/utils/extract
trunk/utils/filter
trunk/utils/ident
trunk/utils/jscal-restore.in
trunk/utils/jscal-store.in
Modified: trunk/utils/Makefile
===================================================================
--- trunk/utils/Makefile 2011-03-06 21:07:05 UTC (rev 2405)
+++ trunk/utils/Makefile 2011-03-09 16:54:30 UTC (rev 2406)
@@ -33,8 +33,10 @@
CFLAGS = -g -O2 -Wall -I../linux/include
PROGRAMS = evtest inputattach jstest jscal fftest ffmvforce ffset \
- ffcfstress # acceltest
+ ffcfstress jscal-restore jscal-store # acceltest
+PREFIX ?= /usr/local
+
compile: $(PROGRAMS)
clean:
@@ -65,3 +67,16 @@
acceltest: acceltest.c
$(CC) $(CFLAGS) $(CPPFLAGS) $^ -lm -o $@
+
+jscal-restore: jscal-restore.in
+ sed "s^@@PREFIX@@^$(PREFIX)^g" < $^ > $@
+
+jscal-store: jscal-store.in
+ sed "s^@@PREFIX@@^$(PREFIX)^g" < $^ > $@
+
+install: compile
+ install $(PROGRAMS) $(DESTDIR)$(PREFIX)/bin
+ install -d $(DESTDIR)$(PREFIX)/share/joystick
+ install extract filter ident $(DESTDIR)$(PREFIX)/share/joystick
+
+.PHONY: compile clean install
Added: trunk/utils/extract
===================================================================
--- trunk/utils/extract (rev 0)
+++ trunk/utils/extract 2011-03-09 16:54:30 UTC (rev 2406)
@@ -0,0 +1,56 @@
+#!/usr/bin/awk -f
+
+# Extracts the settings for a given joystick from the joystick
+# parameter file, matching the contents of the kernel, name, serial,
+# vendor and product variables (typically specified on the command
+# line), repectively kernel device, joystick name, joystick serial
+# number, USB vendor code, USB product code.
+# The exit code is 0 if a section was found, 1 otherwise. If multiple
+# sections match, only the first is kept.
+
+BEGIN {
+ FS = "\"";
+ seckernel = "";
+ secname = "";
+ secserial = "";
+ secvendor = "";
+ secproduct = "";
+}
+
+/^DEVICE=/ {
+ seckernel = $2;
+}
+
+/^NAME=/ {
+ secname = $2;
+}
+
+/^SERIAL=/ {
+ secserial = $2;
+}
+
+/^VENDOR=/ {
+ secvendor = $2;
+}
+
+/^PRODUCT/ {
+ secproduct = $2;
+}
+
+/(^js)|(^$)/ {
+ # Command or empty line, ends the match criteria for a given
+ # section
+ if ((kernel == "" || seckernel == kernel) &&
+ (name == "" || secname == name) &&
+ (serial == "" || secserial == serial) &&
+ (vendor == "" || secvendor == vendor) &&
+ (product == "" || secproduct == product)) {
+ # The section matches, output the command or exit if we've
+ # reached the end of the section
+ if ($0 ~ /^js/) {
+ print $0;
+ } else {
+ exit 0;
+ }
+ }
+}
Property changes on: trunk/utils/extract
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/utils/filter
===================================================================
--- trunk/utils/filter (rev 0)
+++ trunk/utils/filter 2011-03-09 16:54:30 UTC (rev 2406)
@@ -0,0 +1,79 @@
+#!/usr/bin/awk -f
+
+# Filters the joystick parameter file, keeping everything but sections
+# matching the contents of the kernel, name, serial, vendor and
+# product variables (typically specified on the command line),
+# repectively kernel device, joystick name, joystick serial number,
+# USB vendor code, USB product code.
+
+BEGIN {
+ FS = "\"";
+ seckernel = "";
+ secname = "";
+ secserial = "";
+ secvendor = "";
+ secproduct = "";
+ secoutput = 0;
+}
+
+/^DEVICE=/ {
+ seckernel = $2;
+}
+
+/^NAME=/ {
+ secname = $2;
+}
+
+/^SERIAL=/ {
+ secserial = $2;
+}
+
+/^VENDOR=/ {
+ secvendor = $2;
+}
+
+/^PRODUCT/ {
+ secproduct = $2;
+}
+
+/(^js)|(^$)/ {
+ # Command or empty line, ends the match criteria for a given
+ # section
+ if ((kernel == "" || seckernel == kernel) &&
+ (name == "" || secname == name) &&
+ (serial == "" || secserial == serial) &&
+ (vendor == "" || secvendor == vendor) &&
+ (product == "" || secproduct == product)) {
+ # The section matches, skip it
+ } else {
+ # The section doesn't match, output it
+ if (secoutput == 0) {
+ if (seckernel != "") {
+ print "DEVICE=\"" seckernel "\"";
+ }
+ if (secname != "") {
+ print "NAME=\"" secname "\"";
+ }
+ if (secserial != "") {
+ print "SERIAL=\"" secserial "\"";
+ }
+ if (secvendor != "") {
+ print "VENDOR=\"" secvendor "\"";
+ }
+ if (secproduct != "") {
+ print "PRODUCT=\"" secproduct "\"";
+ }
+ secoutput = 1;
+ }
+ print $0;
+ if ($0 ~ /$^/) {
+ # New section, clear the section information
+ secoutput = 0;
+ seckernel = "";
+ secname = "";
+ secserial = "";
+ secvendor = "";
+ secproduct = "";
+ }
+ }
+}
Property changes on: trunk/utils/filter
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/utils/ident
===================================================================
--- trunk/utils/ident (rev 0)
+++ trunk/utils/ident 2011-03-09 16:54:30 UTC (rev 2406)
@@ -0,0 +1,70 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+ FS = "\"";
+ kernel = "";
+ name = "";
+ serial = "";
+ vendor = "";
+ product = "";
+ seckernel = "";
+ secname = "";
+ secserial = "";
+ secvendor = "";
+ secproduct = "";
+}
+
+/KERNEL==/ {
+ kernel = $2;
+}
+
+/KERNELS==/ {
+ seckernel = $2;
+}
+
+/ATTRS{name}/ {
+ secname = $2;
+}
+
+/ATTRS{serial}/ {
+ secserial = $2;
+}
+
+/ATTRS{idVendor}/ {
+ secvendor = $2;
+}
+
+/ATTRS{idProduct}/ {
+ secproduct = $2;
+}
+
+/$^/ {
+ # New section, check the values remembered from the previous
+ # If the section defined a name, and we don't have one, and the
+ # section described an input device, store the name and serial
+ if (match(seckernel, "input") != 0 && secname != "" && name == "") {
+ name = secname;
+ serial = secserial;
+ }
+ # If the section defined a vendor (for USB devices), and we don't
+ # have one, store the vendor and product
+ if (secvendor != "" && vendor == "") {
+ vendor = secvendor;
+ product = secproduct;
+ }
+
+ # Clear all section values before processing next section
+ seckernel = "";
+ secname = "";
+ secserial = "";
+ secvendor = "";
+ secproduct = "";
+}
+
+END {
+ print "DEVICE=\"" kernel "\"";
+ print "NAME=\"" name "\"";
+ print "SERIAL=\"" serial "\"";
+ print "VENDOR=\"" vendor "\"";
+ print "PRODUCT=\"" product "\"";
+}
Property changes on: trunk/utils/ident
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/utils/jscal-restore.in
===================================================================
--- trunk/utils/jscal-restore.in (rev 0)
+++ trunk/utils/jscal-restore.in 2011-03-09 16:54:30 UTC (rev 2406)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if [ ! -x /sbin/udevadm ]; then
+ echo Restoring joystick configuration requires udev! >&2
+fi
+
+ident=$(mktemp)
+/sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
+. $ident
+rm -f $ident
+
+STORE=/var/lib/joystick/joystick.state
+
+# Retrieve the applicable commands
+commands=$(mktemp)
+if [ -f $STORE ]; then
+ if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then
+ # Use the device name only
+ @@PREFIX@@/share/joystick/extract kernel="$DEVICE" < $STORE > $commands
+ else
+ @@PREFIX@@/share/joystick/extract name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" < $STORE > $commands
+ fi
+fi
+
+# Run the commands if any
+if [ -f $commands ] && [ ! -z "$(cat $commands)" ]; then
+ while read command; do
+ $command $1
+ done < $commands
+fi
+
+# Delete the generated file
+rm -f $commands
Property changes on: trunk/utils/jscal-restore.in
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/utils/jscal-store.in
===================================================================
--- trunk/utils/jscal-store.in (rev 0)
+++ trunk/utils/jscal-store.in 2011-03-09 16:54:30 UTC (rev 2406)
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# Stores the current calibration settings for the given joystick
+# (materialized by its device). The calibration settings are stored
+# using the joystick's name and serial number if available, and its
+# vendor and product codes if it's a USB device. If none of these can
+# be determined, the settings are stored against the device name.
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 {device}"
+ echo "Stores the device's calibration for future use."
+ exit 1
+fi
+
+if [ ! -x /sbin/udevadm ]; then
+ echo Storing joystick configuration requires udev! >&2
+fi
+
+ident=$(mktemp)
+/sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
+. $ident
+rm $ident
+
+STORE=/var/lib/joystick/joystick.state
+
+# Filter the existing file
+if [ -f $STORE ]; then
+ if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then
+ echo "No product name or vendor available, calibration will be stored for the"
+ echo "given device name ($DEVICE) only!"
+ @@PREFIX@@/share/joystick/filter kernel="$DEVICE" < $STORE > $STORE.new
+ else
+ @@PREFIX@@/share/joystick/filter name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" < $STORE > $STORE.new
+ fi
+fi
+
+# Append the new calibration information
+if [ -f $STORE.new ] && [ ! -z "$(cat $STORE.new)" ]; then
+ echo >> $STORE.new
+fi
+if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then
+ echo "DEVICE=\"$DEVICE\"" >> $STORE.new
+fi
+if [ ! -z "$NAME" ]; then
+ echo "NAME=\"$NAME\"" >> $STORE.new
+fi
+if [ ! -z "$SERIAL" ]; then
+ echo "SERIAL=\"$SERIAL\"" >> $STORE.new
+fi
+if [ ! -z "$VENDOR" ]; then
+ echo "VENDOR=\"$VENDOR\"" >> $STORE.new
+fi
+if [ ! -z "$PRODUCT" ]; then
+ echo "PRODUCT=\"$PRODUCT\"" >> $STORE.new
+fi
+jscal -p $1 | cut -d' ' -f-3 >> $STORE.new
+jscal -q $1 | cut -d' ' -f-3 >> $STORE.new
+
+if [ -f $STORE ]; then
+ mv $STORE $STORE.old
+fi
+mv $STORE.new $STORE
+rm -f $STORE.old
Property changes on: trunk/utils/jscal-store.in
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-06 21:07:11
|
Revision: 2405
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2405&view=rev
Author: skitt
Date: 2011-03-06 21:07:05 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
Drop obsolete cvmove.
Removed Paths:
-------------
trunk/utils/cvmove
Deleted: trunk/utils/cvmove
===================================================================
--- trunk/utils/cvmove 2011-03-06 14:38:03 UTC (rev 2404)
+++ trunk/utils/cvmove 2011-03-06 21:07:05 UTC (rev 2405)
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-mv $1 $2
-cvs remove $1
-cd $2
-cvs add $1
-cvs commit -r 1.`expr \`grep \\\\$Id$1 | sed -e "s/^.*,v 1\.//" | sed -e "s/200.*\\\\$//"\` + 1` -m Moved. $1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-06 14:38:09
|
Revision: 2404
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2404&view=rev
Author: skitt
Date: 2011-03-06 14:38:03 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
Document Zhen Hua and Wacom W8001 support.
Modified Paths:
--------------
trunk/docs/inputattach.1
Modified: trunk/docs/inputattach.1
===================================================================
--- trunk/docs/inputattach.1 2011-03-06 14:36:47 UTC (rev 2403)
+++ trunk/docs/inputattach.1 2011-03-06 14:38:03 UTC (rev 2404)
@@ -1,9 +1,9 @@
-.TH inputattach 1 "June 16, 2009" inputattach
+.TH inputattach 1 "March 6, 2011" inputattach
.SH NAME
inputattach \- attach a serial line to an input-layer device
.SH SYNOPSIS
-.BR inputattach " [" \-\-daemon "] [" \-\-always "] [" \-\-noinit "]"
-.RI "<" mode "> <" device ">"
+.BR inputattach " [" \-\-daemon "] [" \-\-always "] [" \-\-noinit "] [" \-\-baud
+.IR baud ">] <" mode "> <" device ">"
.SH DESCRIPTION
.B inputattach
attaches a serial line to an input-layer device via a line
@@ -21,6 +21,9 @@
.TP
.B \-\-noinit
Skip device initialization.
+.TP
+.B \-\-baud
+Specify the baud rate to use (for w8001).
.SS Modes
.TP
.BR \-dump ", " \-\-dump
@@ -119,8 +122,14 @@
.BR \-vs ", " \-\-vsxxx-aa
DEC VSXXX-AA / VSXXX-GA mouse and VSXXX-A tablet
.TP
+.BR \-w8001 ", " \-\-w8001
+Wacom W8001
+.TP
.BR \-war ", " \-\-warrior
WingMan Warrior
+.TP
+.BR \-zhen ", " \-\-zhen-hua
+Zhen Hua 5-byte protocol
.SH AUTHORS
.B inputattach
was written by Vojtech Pavlik and Arndt Schoenewald.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-06 14:36:53
|
Revision: 2403
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2403&view=rev
Author: skitt
Date: 2011-03-06 14:36:47 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
AWK script to generate the modes section of the inputattach(1) manpage.
Added Paths:
-----------
trunk/docs/list-inputattach-modes
Added: trunk/docs/list-inputattach-modes
===================================================================
--- trunk/docs/list-inputattach-modes (rev 0)
+++ trunk/docs/list-inputattach-modes 2011-03-06 14:36:47 UTC (rev 2403)
@@ -0,0 +1,12 @@
+#!/usr/bin/awk -f
+
+/^ --.*-/ {
+ print ".TP";
+ print ".BR \\-" substr($2, 2) " \", \" " "\\-\\-" substr($1, 3);
+# print "\\fB\\-" substr($2, 2) "\\fR, \\fB\\-\\-" substr($1, 3) "\\fR";
+ remainder = "";
+ for (i = 3; i <= NF; i++)
+ remainder = remainder $i " ";
+ print remainder;
+}
+
Property changes on: trunk/docs/list-inputattach-modes
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2011-03-06 14:27:59
|
Revision: 2402
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2402&view=rev
Author: skitt
Date: 2011-03-06 14:27:53 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
Support the wacom_w8001 driver. Thanks to Alexander Clouter
<al...@di...> for collating the various patches!
Modified Paths:
--------------
trunk/utils/inputattach.c
Modified: trunk/utils/inputattach.c
===================================================================
--- trunk/utils/inputattach.c 2010-12-28 22:17:35 UTC (rev 2401)
+++ trunk/utils/inputattach.c 2011-03-06 14:27:53 UTC (rev 2402)
@@ -583,6 +583,9 @@
{ "--dump", "-dump", "Just enable device",
B2400, CS8,
0, 0x00, 0x00, 0, dump_init },
+{ "--w8001", "-w8001", "Wacom W8001",
+ B38400, CS8,
+ SERIO_W8001, 0x00, 0x00, 0, NULL },
{ NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL }
};
@@ -591,7 +594,7 @@
struct input_types *type;
puts("");
- puts("Usage: inputattach [--daemon] [--always] [--noinit] <mode> <device>");
+ puts("Usage: inputattach [--daemon] [--baud <baud>] [--always] [--noinit] <mode> <device>");
puts("");
puts("Modes:");
@@ -615,6 +618,7 @@
int i;
unsigned char c;
int retval;
+ int baud = -1;
int ignore_init_res = 0;
int no_init = 0;
@@ -631,6 +635,15 @@
} else if (need_device) {
device = argv[i];
need_device = 0;
+ } else if (!strcasecmp(argv[i], "--baud")) {
+ if (argc <= i + 1) {
+ show_help();
+ fprintf(stderr,
+ "inputattach: require baud rate\n");
+ return EXIT_FAILURE;
+ }
+
+ baud = atoi(argv[++i]);
} else {
if (type && type->name) {
fprintf(stderr,
@@ -671,6 +684,19 @@
return 1;
}
+ switch(baud) {
+ case -1: break;
+ case 2400: type->speed = B2400; break;
+ case 4800: type->speed = B4800; break;
+ case 9600: type->speed = B9600; break;
+ case 19200: type->speed = B19200; break;
+ case 38400: type->speed = B38400; break;
+ default:
+ fprintf(stderr, "inputattach: invalid baud rate '%d'\n",
+ baud);
+ return EXIT_FAILURE;
+ }
+
setline(fd, type->flags, type->speed);
if (type->flush)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-12-28 22:17:42
|
Revision: 2401
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2401&view=rev
Author: skitt
Date: 2010-12-28 22:17:35 +0000 (Tue, 28 Dec 2010)
Log Message:
-----------
Import Debian manpages.
Added Paths:
-----------
trunk/docs/evtest.1
trunk/docs/ffcfstress.1
trunk/docs/ffmvforce.1
trunk/docs/ffset.1
trunk/docs/fftest.1
trunk/docs/inputattach.1
trunk/docs/jscal.1
trunk/docs/jskeepalive.1
trunk/docs/jstest.1
Added: trunk/docs/evtest.1
===================================================================
--- trunk/docs/evtest.1 (rev 0)
+++ trunk/docs/evtest.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,25 @@
+.TH evtest 1 "July 23, 2008" evtest
+.SH NAME
+evtest \- Input device event monitor
+.SH SYNOPSIS
+.B evtest
+.I /dev/input/eventX
+.SH DESCRIPTION
+evtest displays information on the input device specified on the
+command line, including all the events supported by the device.
+It then monitors the device and displays all the events layer events
+generated.
+.PP
+evtest needs to be able to read from the device; in most cases this
+means it must be run as root.
+.SH AUTHOR
+.B evtest
+was written by Vojtech Pavlik <vo...@su...>.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, based on
+that present in the
+.B lineakd
+package, for the Debian GNU/Linux system (but may be used by others).
+It was last modified for
+.B evtest
+version 1.23, dated February 6, 2005.
Added: trunk/docs/ffcfstress.1
===================================================================
--- trunk/docs/ffcfstress.1 (rev 0)
+++ trunk/docs/ffcfstress.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,46 @@
+.TH ffcfstress 1 "March 8, 2009" ffcfstress
+.SH NAME
+ffcfstress \- constant force stress test for force-feedback devices
+.SH SYNOPSIS
+.B ffcfstress
+.RB "[" \-d " <\fIdevice\fP>] [" \-u " <\fIupdate rate\fP>] [" \-f " <\fIfrequency\fP>] [" \-a " <\fIamplitude\fP>] [" \-s " <\fIstrength\fP>] [" \-o "]"
+.SH "DESCRIPTION"
+ffcfstress stress tests constant non-enveloped forces on a force
+feedback device.
+It simulates a moving spring force by applying a frequently updated
+constant force effect.
+.PP
+.B Beware, the stress test may damage your device!
+.SH OPTIONS
+At least one option is required.
+.TP
+.BR \-d " <\fIdevice\fP>"
+The device to test (by default \fI/dev/input/event0\fR).
+.TP
+.BR \-u " <\fIupdate rate\fP>"
+The update rate in Hz (25 by default).
+.TP
+.BR \-f " <\fIfrequency\fP>"
+The spring center motion frequency in Hz (0.1 by default).
+.TP
+.BR \-a " <\fIamplitude\fP>"
+The spring center motion amplitude, between 0.0 and 1.0 (1.0 by
+default).
+.TP
+.BR \-s " <\fIstrength\fP>"
+The spring strength factor (1.0 by default).
+.TP
+.B \-o
+Dummy option, useful when all defaults should be used.
+.SH SEE ALSO
+\fBffmvforce\fP(1), \fBfftest\fP(1), \fBjstest\fP(1).
+.SH AUTHOR
+.B ffcfstress
+was written by Oliver Hamann.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the Debian
+GNU/Linux system (but may be used by others).
+It was last modified for
+.B ffcfstress
+dated February 15, 2002.
+
Added: trunk/docs/ffmvforce.1
===================================================================
--- trunk/docs/ffmvforce.1 (rev 0)
+++ trunk/docs/ffmvforce.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,30 @@
+.TH ffmvforce 1 "March 8, 2009" ffmvforce
+.SH NAME
+ffmvforce \- force orientation test for force-feedback devices
+.SH SYNOPSIS
+.B ffmvforce
+.RI "<" device "> [\fB-u\fP <" "update rate" ">]"
+.SH "DESCRIPTION"
+ffmvforce generates a force in a given direction, indicated by the
+position of the mouse pointer in relation to the center of the tool's
+window.
+.PP
+.B Beware, the stress test may damage your device!
+.SH OPTIONS
+.TP
+.RI "<" device ">"
+The device to test.
+.TP
+.BR \-u " <\fIupdate rate\fP>"
+The update rate in Hz (5 by default).
+.SH SEE ALSO
+\fBffcfstress\fP(1), \fBfftest\fP(1), \fBjstest\fP(1).
+.SH AUTHOR
+.B ffmvforce
+was written by Oliver Hamann.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the Debian
+GNU/Linux system (but may be used by others).
+It was last modified for
+.B ffmvforce
+dated February 15, 2002.
Added: trunk/docs/ffset.1
===================================================================
--- trunk/docs/ffset.1 (rev 0)
+++ trunk/docs/ffset.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,30 @@
+.TH ffset 1 "March 8, 2009" ffset
+.SH NAME
+ffset \- set force-feedback device parameters
+.SH SYNOPSIS
+.B ffset
+.RI "<" device "> [\fB\-g\fP <" gain ">] [\fB\-a\fP <" "autocenter strength" ">]"
+.SH "DESCRIPTION"
+ffset sets the gain and autocenter strength of a force-feedback
+device.
+.SH OPTIONS
+.TP
+.RI "<" device ">"
+The device to configure.
+.TP
+.BR \-g " <\fIgain\fP>"
+The gain (0-100).
+.TP
+.BR \-a " <\fIautocenter strength\fP>"
+The autocenter strength (0-100).
+.SH SEE ALSO
+\fBffcfstress\fP(1), \fBffmvforce\fP(1), \fBfftest\fP(1), \fBjscal\fP(1), \fBjstest\fP(1).
+.SH AUTHOR
+.B ffset
+was written by Johann Deneux.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the
+Debian GNU/Linux system (but may be used by others).
+It was last modified for
+.B ffmvforce
+dated May 30, 2001.
Added: trunk/docs/fftest.1
===================================================================
--- trunk/docs/fftest.1 (rev 0)
+++ trunk/docs/fftest.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,25 @@
+.TH fftest 1 "March 8, 2009" fftest
+.SH NAME
+fftest \- tests force-feedback devices.
+.SH SYNOPSIS
+.B fftest
+.RI "<" device ">"
+.SH "DESCRIPTION"
+fftest provides a variety of tests which can be applied to
+force-feedback devices.
+.B Beware, the tests may damage your device!
+.SH OPTIONS
+.TP
+.RI "<" device ">"
+The device to test.
+.SH SEE ALSO
+\fBffcfstress\fP(1), \fBffmvforce\fP(1), \fBjstest\fP(1).
+.SH AUTHOR
+.B fftest
+was written by Johann Deneux.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the Debian
+GNU/Linux system (but may be used by others).
+It was last modified for
+.B fftest
+dated October 19, 2004.
Added: trunk/docs/inputattach.1
===================================================================
--- trunk/docs/inputattach.1 (rev 0)
+++ trunk/docs/inputattach.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,134 @@
+.TH inputattach 1 "June 16, 2009" inputattach
+.SH NAME
+inputattach \- attach a serial line to an input-layer device
+.SH SYNOPSIS
+.BR inputattach " [" \-\-daemon "] [" \-\-always "] [" \-\-noinit "]"
+.RI "<" mode "> <" device ">"
+.SH DESCRIPTION
+.B inputattach
+attaches a serial line to an input-layer device via a line
+discipline.
+.PP
+Exactly one of the available modes must be specified on the command
+line.
+.SH OPTIONS
+.TP
+.B \-\-daemon
+Forks into the background.
+.TP
+.B \-\-always
+Ignore initialization failures when attaching the device.
+.TP
+.B \-\-noinit
+Skip device initialization.
+.SS Modes
+.TP
+.BR \-dump ", " \-\-dump
+Just enable device
+.TP
+.BR \-elo3b ", " \-\-elo261-280
+ELO Touchscreen, 3-byte mode
+.TP
+.BR \-elo4b ", " \-\-elo271-140
+ELO touchscreen, 4-byte mode
+.TP
+.BR \-elo6b ", " \-\-elo4002
+ELO touchscreen, 6-byte mode
+.TP
+.BR \-elo ", " \-\-elotouch
+ELO touchscreen, 10-byte mode
+.TP
+.BR \-fjt ", " \-\-fujitsu
+Fujitsu serial touchscreen
+.TP
+.BR \-ipaq ", " \-\-h3600ts
+Ipaq h3600 touchscreen
+.TP
+.BR \-ifor ", " \-\-iforce
+I-Force joystick or wheel
+.TP
+.BR \-ms3 ", " \-\-intellimouse
+Microsoft IntelliMouse
+.TP
+.BR \-lk ", " \-\-lkkbd
+DEC LK201 / LK401 keyboards
+.TP
+.BR \-mag ", " \-\-magellan
+Magellan / SpaceMouse
+.TP
+.BR \-bare ", " \-\-microsoft
+2-button Microsoft mouse
+.TP
+.BR \-mmw ", " \-\-mmwheel
+Logitech mouse with 4-5 buttons or a wheel
+.TP
+.BR \-mman ", " \-\-mouseman
+3-button Logitech / Genius mouse
+.TP
+.BR \-msc ", " \-\-mousesystems
+3-button Mouse Systems mouse
+.TP
+.BR \-ms ", " \-\-mshack
+3-button mouse in Microsoft mode
+.TP
+.BR \-mtouch ", " \-\-mtouch
+MicroTouch (3M) touchscreen
+.TP
+.BR \-newt ", " \-\-newtonkbd
+Newton keyboard
+.TP
+.BR \-pm ", " \-\-penmount
+Penmount touchscreen
+.TP
+.BR \-ps2ser ", " \-\-ps2serkbd
+PS/2 via serial keyboard
+.TP
+.BR \-sbl ", " \-\-spaceball
+SpaceBall 2003 / 3003 / 4000 FLX
+.TP
+.BR \-orb ", " \-\-spaceorb
+SpaceOrb 360 / SpaceBall Avenger
+.TP
+.BR \-sting ", " \-\-stinger
+Gravis Stinger
+.TP
+.BR \-ipaqkbd ", " \-\-stowawaykbd
+Stowaway keyboard
+.TP
+.BR \-skb ", " \-\-sunkbd
+Sun Type 4 and Type 5 keyboards
+.TP
+.BR \-sun ", " \-\-sunmouse
+3-button Sun mouse
+.TP
+.BR \-t213 ", " \-\-touchit213
+Sahara Touch-iT213 Tablet PC
+.TP
+.BR \-tr ", " \-\-touchright
+Touchright serial touchscreen
+.TP
+.BR \-tw ", " \-\-touchwin
+Touchwindow serial touchscreen
+.TP
+.BR \-twidjoy ", " \-\-twiddler-joy
+Handykey Twiddler used as a joystick
+.TP
+.BR \-twid ", " \-\-twiddler
+Handykey Twiddler chording keyboard
+.TP
+.BR \-vs ", " \-\-vsxxx-aa
+DEC VSXXX-AA / VSXXX-GA mouse and VSXXX-A tablet
+.TP
+.BR \-war ", " \-\-warrior
+WingMan Warrior
+.SH AUTHORS
+.B inputattach
+was written by Vojtech Pavlik and Arndt Schoenewald.
+The version packaged for Debian includes updates by Dmitry Torokhov
+and Sahara Touch-iT213 support by Claudio Nieder.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the Debian
+GNU/Linux system (but may be used by others).
+It was last modified for
+.B inputattach
+version 1.24, dated April 4, 2007.
Added: trunk/docs/jscal.1
===================================================================
--- trunk/docs/jscal.1 (rev 0)
+++ trunk/docs/jscal.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,84 @@
+.TH jscal 1 "Jul 11, 2010" jscal
+.SH NAME
+jscal \- joystick calibration and remapping program
+.SH SYNOPSIS
+.BR jscal
+.RI "[" options "] <" device\(hyname ">"
+.SH DESCRIPTION
+.B jscal
+calibrates joysticks and maps joystick axes and buttons.
+Calibrating a joystick ensures the positions on the various axes are
+correctly interpreted.
+Mapping axes and buttons allows the meanings of the joystick's axes
+and buttons to be redefined.
+.PP
+On Debian systems the calibration settings can be stored and later
+applied automatically using the
+.B jscal-store
+command.
+.SH OPTIONS
+.TP
+.BR \-c ", " \-\-calibrate
+Calibrate the joystick.
+.TP
+.BR \-h ", " \-\-help
+Print out a summary of available options.
+.TP
+.BR \-s ", " \-\-set\-correction " <\fInb_axes\fP,\fItype\fP,\fIprecision\fP,\fIcoefficients\fP,...>"
+Sets correction to specified values.
+For each axis, specify the correction type (0 for none, 1 for "broken
+line"), the precision, and if necessary the correction coefficients
+("broken line" corrections take four coefficients).
+.TP
+.BR \-u ", " \-\-set\-mappings " <\fInb_axes\fP,\fIaxmap1\fP,\fIaxmap2\fP,...,\fInb_buttons\fP,\fIbtnmap1\fP,\fIbtnmap2\fP,...>"
+Sets axis and button mappings.
+\fIn_of_buttons\fP can be set to 0 to remap axes only.
+.IP "\fB\-t\fR, \fB\-\-test\-center\fR"
+Tests if the joystick is correctly calibrated.
+Returns 2 if the axes are not calibrated, 3 if buttons were pressed, 1
+if there was any other error, and 0 on success.
+.IP "\fB\-V\fR, \fB\-\-version\fR"
+Prints the version numbers of the running joystick driver and that
+which jscal was compiled for.
+.IP "\fB\-p\fR, \fB\-\-print\-correction\fR"
+Prints the current correction settings.
+The format of the output is a jscal command line.
+.IP "\fB\-q\fR, \fB\-\-print\-mappings\fR"
+Prints the current axis and button mappings.
+The format of the output is a jscal command line.
+.SH CALIBRATION
+Using the Linux input system, joysticks are expected to produce values
+between \-32767 and 32767 for axes, with 0 meaning the joystick is
+centred.
+Thus, full\(hyleft should produce \-32767 on the X axis, full\(hyright
+32767 on the X axis, full\(hyforward \-32767 on the Y axis, and so on.
+.PP
+Many joysticks and gamepads (especially older ones) are slightly
+mis\(hyaligned; as a result they may not use the full range of values
+(for the extremes of the axes), or more annoyingly they may not give 0
+when centred.
+Calibrating a joystick provides the kernel with information on a
+joystick's real behaviour, which allows the kernel to correct various
+joysticks' deficiencies and produce consistent output as far as
+joystick\(hyusing software is concerned.
+.PP
+\fBjstest\fP(1) is useful to determine whether a joystick is
+calibrated: when run, it should produce all 0s when the joystick is at
+rest, and each axis should be able to produce the values \-32767 and
+32767.
+Analog joysticks should produce values in between 0 and the extremes,
+but this is not necessary; digital directional pads work fine with
+only the three values.
+.SH SEE ALSO
+\fBffset\fP(1), \fBjstest\fP(1), \fBjscal\-store\fP(1).
+.SH AUTHORS
+.B jscal
+was written by Vojtech Pavlik.
+The version packaged for Debian includes patches by Dr. László Kaján,
+Johann Walles and Krzysztof A. Sobiecki.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the Debian
+GNU/Linux system (but may be used by others).
+It was last modified for
+.B jscal
+version 1.2 dated October 19, 2004.
Added: trunk/docs/jskeepalive.1
===================================================================
--- trunk/docs/jskeepalive.1 (rev 0)
+++ trunk/docs/jskeepalive.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,16 @@
+.TH jskeepalive 1 "April 7, 2010" jskeepalive
+.SH NAME
+jskeepalive \- keeps a joystick alive
+.SH SYNOPSIS
+.BR jskeepalive
+.RI "<" device-name ">"
+.SH DESCRIPTION
+.B jskeepalive
+continuously reads from the given joystick device. (This doesn't
+prevent other programs from accessing the same joystick device.) This
+is necessary for certains joysticks which disappear if they are not
+accessed during a given interval (see
+https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446).
+.SH AUTHOR
+.B jskeepalive
+was written by Stephen Kitt.
Added: trunk/docs/jstest.1
===================================================================
--- trunk/docs/jstest.1 (rev 0)
+++ trunk/docs/jstest.1 2010-12-28 22:17:35 UTC (rev 2401)
@@ -0,0 +1,39 @@
+.TH jstest 1 "April 21, 2009" jstest
+.SH NAME
+jstest \- joystick test program
+.SH SYNOPSIS
+.BR jstest " [" \-\-normal "] [" \-\-old "] [" \-\-event "] [" \-\-nonblock "] [" \-\-select "] <\fIdevice-name\fP>"
+.SH DESCRIPTION
+\fBjstest\fP can be used to test all the features of the Linux
+joystick API, including non-blocking and \fBselect\fP(2) access, as
+well as version 0.x compatibility mode.
+.PP
+It is also intended to serve as an example implementation for those
+who wish to learn how to write their own joystick using applications.
+.SH OPTIONS
+.TP
+.B \-\-normal
+One-line mode showing immediate status.
+.TP
+.B \-\-old
+Same as \-\-normal, using 0.x interface.
+.TP
+.B \-\-event
+Prints events as they come in.
+.TP
+.B \-\-nonblock
+Same as \-\-event, in nonblocking mode.
+.TP
+.B \-\-select
+Same as \--event, using \fBselect\fP(2) call.
+.SH SEE ALSO
+\fBfftest\fP(1), \fBjscal\fP(1).
+.SH AUTHOR
+.B jstest
+was written by Vojtech Pavlik.
+.PP
+This manual page was written by Stephen Kitt <st...@sk...>, for the Debian
+GNU/Linux system (but may be used by others).
+It was last modified for
+.B jstest
+version 1.2, dated March 22, 2005.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-12-28 22:07:47
|
Revision: 2400
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2400&view=rev
Author: skitt
Date: 2010-12-28 22:07:41 +0000 (Tue, 28 Dec 2010)
Log Message:
-----------
Build with ld --as-needed. Thanks to Stefan Potyra
<sis...@ub...> for the patch (see http://bugs.debian.org/607009
for the Debian bug report).
Modified Paths:
--------------
trunk/utils/Makefile
Modified: trunk/utils/Makefile
===================================================================
--- trunk/utils/Makefile 2010-11-04 12:16:54 UTC (rev 2399)
+++ trunk/utils/Makefile 2010-12-28 22:07:41 UTC (rev 2400)
@@ -41,7 +41,7 @@
$(RM) *.o *.swp $(PROGRAMS) *.orig *.rej map *~
ffcfstress: ffcfstress.c
- $(CC) -O2 -funsigned-char -lm ffcfstress.c -o ffcfstress
+ $(CC) -O2 -funsigned-char ffcfstress.c -lm -o ffcfstress
ffmvforce.o: ffmvforce.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $^ -o $@ `sdl-config --cflags`
@@ -54,7 +54,7 @@
jscal.o: jscal.c axbtnmap.h
jscal: jscal.o axbtnmap.o
- $(CC) $(CFLAGS) $(CPPFLAGS) -lm $^ -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $^ -lm -o $@
jstest.o: jstest.c axbtnmap.h
@@ -64,4 +64,4 @@
$(CC) $(CFLAGS) $(CPPFLAGS) gencodes.c -o gencodes
acceltest: acceltest.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -lm $^ -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $^ -lm -o $@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-11-04 12:17:01
|
Revision: 2399
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2399&view=rev
Author: skitt
Date: 2010-11-04 12:16:54 +0000 (Thu, 04 Nov 2010)
Log Message:
-----------
this is a driver for Zhen Hua PCM-4CH RC transmitter (commonly used in
cheap Ready To Fly RC helicopters) which using "Zhen Hua 5-byte
protocol" for using them as a four axis joystick via serial port.
Transmitter connected to serial port (19200 8N1) sending periodically
5 bytes where first byte is for synchronization and next four bytes
are values of axis.
Signed-off-by: Martin Kebert <gk...@gm...>
Signed-off-by: Stephen Kitt <st...@sk...>
Modified Paths:
--------------
trunk/utils/inputattach.c
Modified: trunk/utils/inputattach.c
===================================================================
--- trunk/utils/inputattach.c 2010-11-04 06:15:52 UTC (rev 2398)
+++ trunk/utils/inputattach.c 2010-11-04 12:16:54 UTC (rev 2399)
@@ -403,6 +403,44 @@
return -1;
}
+static int zhenhua_init(int fd, unsigned long *id, unsigned long *extra)
+{
+ /* Zhen Hua 5 byte protocol: first (synchronization) byte allways
+ * contain 0xF7, next four bytes are axis of controller with values
+ * between 50-200.
+ * Incoming data (each byte) have reversed bits (lowest bit is
+ * highest bit) - something like little-endian but on bit level.
+ * Synchronization byte without reversing bits have (raw) value:
+ * 0xEF
+ *
+ * Initialization is almost same as twiddler_init */
+
+ unsigned char c[10];
+ int count;
+
+ for (count=0 ; count < 5 ; count++) {
+ if(readchar(fd, c+0, 500)) return -1;
+ if(c[0] == 0xef) break;
+ }
+
+ if (count == 5) {
+ /* Could not find header byte in data stream */
+ return -1;
+ }
+
+ /* Read remaining 4 bytes plus the full next data packet */
+ for (count = 1; count < 10; count++) {
+ if (readchar(fd, c+count, 500)) return -1;
+ }
+
+ /* check if next sync byte exists */
+ if (c[5] != 0xef)
+ return -1;
+
+ return 0;
+
+}
+
static int dump_init(int fd, unsigned long *id, unsigned long *extra)
{
unsigned char c, o = 0;
@@ -539,6 +577,9 @@
{ "--ps2mult", "-ps2m", "PS/2 serial multiplexer",
B57600, CS8,
SERIO_PS2MULT, 0x00, 0x00, 1, NULL },
+{ "--zhen-hua", "-zhen", "Zhen Hua 5-byte protocol",
+ B19200, CS8,
+ SERIO_ZHENHUA, 0x00, 0x00, 0, zhenhua_init },
{ "--dump", "-dump", "Just enable device",
B2400, CS8,
0, 0x00, 0x00, 0, dump_init },
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-11-04 06:15:59
|
Revision: 2398
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2398&view=rev
Author: skitt
Date: 2010-11-04 06:15:52 +0000 (Thu, 04 Nov 2010)
Log Message:
-----------
Dmitry Torokhov has merged into his "next" tree a patch to support ps2
multiplexers
on TQM85xx boards. Attached is a patch that adds necessary support to
inputattach.
Signed-off-by: Dmitry Eremin-Solenikov <dba...@gm...>
Modified Paths:
--------------
trunk/utils/inputattach.c
trunk/utils/serio-ids.h
Modified: trunk/utils/inputattach.c
===================================================================
--- trunk/utils/inputattach.c 2010-09-27 05:14:20 UTC (rev 2397)
+++ trunk/utils/inputattach.c 2010-11-04 06:15:52 UTC (rev 2398)
@@ -536,6 +536,9 @@
{ "--fujitsu", "-fjt", "Fujitsu serial touchscreen",
B9600, CS8,
SERIO_FUJITSU, 0x00, 0x00, 1, fujitsu_init },
+{ "--ps2mult", "-ps2m", "PS/2 serial multiplexer",
+ B57600, CS8,
+ SERIO_PS2MULT, 0x00, 0x00, 1, NULL },
{ "--dump", "-dump", "Just enable device",
B2400, CS8,
0, 0x00, 0x00, 0, dump_init },
Modified: trunk/utils/serio-ids.h
===================================================================
--- trunk/utils/serio-ids.h 2010-09-27 05:14:20 UTC (rev 2397)
+++ trunk/utils/serio-ids.h 2010-11-04 06:15:52 UTC (rev 2398)
@@ -122,5 +122,8 @@
#ifndef SERIO_W8001
# define SERIO_W8001 0x39
#endif
+#ifndef SERIO_PSMULT
+# define SERIO_PS2MULT 0x3c
+#endif
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-27 05:14:27
|
Revision: 2397
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2397&view=rev
Author: skitt
Date: 2010-09-27 05:14:20 +0000 (Mon, 27 Sep 2010)
Log Message:
-----------
As encountered on
https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/595767, some
"joystick" type devices support more than 16 axes. The kernel actually
supports ABS_MAX + 1 axes, so handle that many.
Modified Paths:
--------------
trunk/utils/jscal.c
Modified: trunk/utils/jscal.c
===================================================================
--- trunk/utils/jscal.c 2010-09-27 05:13:40 UTC (rev 2396)
+++ trunk/utils/jscal.c 2010-09-27 05:14:20 UTC (rev 2397)
@@ -47,7 +47,6 @@
#define PIT_HZ 1193180L
#define NUM_POS 3
-#define MAX_AXES 16
#define MAX_CORR 1
const char *pos_name[] = {"minimum", "center", "maximum"};
@@ -60,17 +59,17 @@
};
int fd;
-struct js_corr corr[MAX_AXES];
+struct js_corr corr[ABS_MAX + 1];
__u8 axmap[ABS_MAX + 1];
__u8 axmap2[ABS_MAX + 1];
__u16 buttonmap[(KEY_MAX - BTN_MISC + 1)];
char axes, buttons, fuzz;
int version;
-struct correction_data corda[MAX_AXES];
+struct correction_data corda[ABS_MAX + 1];
struct js_info {
int buttons;
- int axis[MAX_AXES];
+ int axis[ABS_MAX + 1];
} js;
void print_position(int i, int a)
@@ -213,7 +212,7 @@
int i, j, t, b;
int axis, pos;
- for (i=0; i<MAX_AXES; i++) {
+ for (i=0; i<ABS_MAX + 1; i++) {
corr[i].type = JS_CORR_NONE;
corr[i].prec = 0;
}
@@ -226,7 +225,7 @@
{
int i;
- int amax[MAX_AXES], amin[MAX_AXES];
+ int amax[ABS_MAX + 1], amin[ABS_MAX + 1];
puts("Calibrating precision: wait and don't touch the joystick.");
@@ -389,7 +388,7 @@
void correct_axes(void)
{
int axmes[ABS_MAX + 1];
- struct js_corr corr_tmp[MAX_AXES];
+ struct js_corr corr_tmp[ABS_MAX + 1];
int i;
int ax[axes];
//Create remapping table
@@ -460,7 +459,7 @@
exit(1);
}
- if (axes > MAX_AXES) axes = MAX_AXES;
+ if (axes > ABS_MAX + 1) axes = ABS_MAX + 1;
if (!p) {
fprintf(stderr, "jscal: missing argument for --set-mappings\n");
@@ -562,7 +561,7 @@
exit(1);
}
- if (axes > MAX_AXES) axes = MAX_AXES;
+ if (axes > ABS_MAX + 1) axes = ABS_MAX + 1;
if (!p) {
fprintf(stderr, "jscal: missing number of axes\n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-27 05:13:46
|
Revision: 2396
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2396&view=rev
Author: skitt
Date: 2010-09-27 05:13:40 +0000 (Mon, 27 Sep 2010)
Log Message:
-----------
Flush the output, to ensure redirection works. Fix suggested by Floran
Fainelli; see http://bugs.debian.org/581740
Modified Paths:
--------------
trunk/utils/evtest.c
Modified: trunk/utils/evtest.c
===================================================================
--- trunk/utils/evtest.c 2010-09-23 12:02:02 UTC (rev 2395)
+++ trunk/utils/evtest.c 2010-09-27 05:13:40 UTC (rev 2396)
@@ -386,5 +386,7 @@
ev[i].value);
}
+ fflush(stdout);
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 12:02:08
|
Revision: 2395
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2395&view=rev
Author: skitt
Date: 2010-09-23 12:02:02 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Fix SDL-related warnings.
Modified Paths:
--------------
trunk/utils/Makefile
trunk/utils/ffmvforce.c
Modified: trunk/utils/Makefile
===================================================================
--- trunk/utils/Makefile 2010-09-23 12:00:54 UTC (rev 2394)
+++ trunk/utils/Makefile 2010-09-23 12:02:02 UTC (rev 2395)
@@ -41,8 +41,7 @@
$(RM) *.o *.swp $(PROGRAMS) *.orig *.rej map *~
ffcfstress: ffcfstress.c
- $(CC) -O2 -fno-implement-inlines -funsigned-char \
- -lm ffcfstress.c -o ffcfstress
+ $(CC) -O2 -funsigned-char -lm ffcfstress.c -o ffcfstress
ffmvforce.o: ffmvforce.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $^ -o $@ `sdl-config --cflags`
Modified: trunk/utils/ffmvforce.c
===================================================================
--- trunk/utils/ffmvforce.c 2010-09-23 12:00:54 UTC (rev 2394)
+++ trunk/utils/ffmvforce.c 2010-09-23 12:02:02 UTC (rev 2395)
@@ -147,7 +147,7 @@
fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
exit(1);
}
- on_exit(SDL_Quit, NULL);
+ atexit(SDL_Quit);
screen = SDL_SetVideoMode(WIN_W, WIN_H, 0, SDL_SWSURFACE);
if (screen == NULL) {
fprintf(stderr, "Could not set video mode: %s\n", SDL_GetError());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 12:01:00
|
Revision: 2394
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2394&view=rev
Author: skitt
Date: 2010-09-23 12:00:54 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
ioctl() return values are negative if an error occurs. A positive
value can be returned legitimately.
This patch is required for jscal to work with kernels starting with
2.6.32; the axis and button map ioctls return the size of the buffer
used when everything goes well.
Modified Paths:
--------------
trunk/utils/evtest.c
trunk/utils/ffcfstress.c
trunk/utils/fftest.c
trunk/utils/inputattach.c
trunk/utils/jscal.c
Modified: trunk/utils/evtest.c
===================================================================
--- trunk/utils/evtest.c 2010-09-23 11:57:57 UTC (rev 2393)
+++ trunk/utils/evtest.c 2010-09-23 12:00:54 UTC (rev 2394)
@@ -317,7 +317,7 @@
return 1;
}
- if (ioctl(fd, EVIOCGVERSION, &version)) {
+ if (ioctl(fd, EVIOCGVERSION, &version) < 0) {
perror("evtest: can't get version");
return 1;
}
Modified: trunk/utils/ffcfstress.c
===================================================================
--- trunk/utils/ffcfstress.c 2010-09-23 11:57:57 UTC (rev 2393)
+++ trunk/utils/ffcfstress.c 2010-09-23 12:00:54 UTC (rev 2394)
@@ -193,7 +193,7 @@
effect.u.constant.envelope.fade_level=0;
/* Upload effect */
- if (ioctl(device_handle,EVIOCSFF,&effect)==-1) {
+ if (ioctl(device_handle,EVIOCSFF,&effect)<0) {
fprintf(stderr,"ERROR: uploading effect failed (%s) [%s:%d]\n",
strerror(errno),__FILE__,__LINE__);
exit(1);
@@ -219,7 +219,7 @@
/* Delete effect */
if (stop_and_play && effect.id!=-1) {
- if (ioctl(device_handle,EVIOCRMFF,effect.id)==-1) {
+ if (ioctl(device_handle,EVIOCRMFF,effect.id)<0) {
fprintf(stderr,"ERROR: removing effect failed (%s) [%s:%d]\n",
strerror(errno),__FILE__,__LINE__);
exit(1);
@@ -236,7 +236,7 @@
effect.u.constant.envelope.fade_level=(short)(force*32767.0); /* only to be safe */
/* Upload effect */
- if (ioctl(device_handle,EVIOCSFF,&effect)==-1) {
+ if (ioctl(device_handle,EVIOCSFF,&effect)<0) {
perror("upload effect");
/* We do not exit here. Indeed, too frequent updates may be
* refused, but that is not a fatal error */
Modified: trunk/utils/fftest.c
===================================================================
--- trunk/utils/fftest.c 2010-09-23 11:57:57 UTC (rev 2393)
+++ trunk/utils/fftest.c 2010-09-23 12:00:54 UTC (rev 2394)
@@ -86,7 +86,7 @@
printf("Device %s opened\n", device_file_name);
/* Query device */
- if (ioctl(fd, EVIOCGBIT(EV_FF, sizeof(unsigned long) * 4), features) == -1) {
+ if (ioctl(fd, EVIOCGBIT(EV_FF, sizeof(unsigned long) * 4), features) < 0) {
perror("Ioctl query");
exit(1);
}
@@ -107,7 +107,7 @@
printf("\nNumber of simultaneous effects: ");
- if (ioctl(fd, EVIOCGEFFECTS, &n_effects) == -1) {
+ if (ioctl(fd, EVIOCGEFFECTS, &n_effects) < 0) {
perror("Ioctl number of effects");
}
@@ -131,7 +131,7 @@
effects[0].replay.length = 20000; /* 20 seconds */
effects[0].replay.delay = 0;
- if (ioctl(fd, EVIOCSFF, &effects[0]) == -1) {
+ if (ioctl(fd, EVIOCSFF, &effects[0]) < 0) {
perror("Upload effects[0]");
}
@@ -149,7 +149,7 @@
effects[1].replay.length = 20000; /* 20 seconds */
effects[1].replay.delay = 0;
- if (ioctl(fd, EVIOCSFF, &effects[1]) == -1) {
+ if (ioctl(fd, EVIOCSFF, &effects[1]) < 0) {
perror("Upload effects[1]");
}
@@ -168,7 +168,7 @@
effects[2].replay.length = 20000; /* 20 seconds */
effects[2].replay.delay = 0;
- if (ioctl(fd, EVIOCSFF, &effects[2]) == -1) {
+ if (ioctl(fd, EVIOCSFF, &effects[2]) < 0) {
perror("Upload effects[2]");
}
@@ -187,7 +187,7 @@
effects[3].replay.length = 20000; /* 20 seconds */
effects[3].replay.delay = 0;
- if (ioctl(fd, EVIOCSFF, &effects[3]) == -1) {
+ if (ioctl(fd, EVIOCSFF, &effects[3]) < 0) {
perror("Upload effects[3]");
}
@@ -199,7 +199,7 @@
effects[4].replay.length = 5000;
effects[4].replay.delay = 1000;
- if (ioctl(fd, EVIOCSFF, &effects[4]) == -1) {
+ if (ioctl(fd, EVIOCSFF, &effects[4]) < 0) {
perror("Upload effects[4]");
}
@@ -211,7 +211,7 @@
effects[5].replay.length = 5000;
effects[5].replay.delay = 0;
- if (ioctl(fd, EVIOCSFF, &effects[5]) == -1) {
+ if (ioctl(fd, EVIOCSFF, &effects[5]) < 0) {
perror("Upload effects[5]");
}
Modified: trunk/utils/inputattach.c
===================================================================
--- trunk/utils/inputattach.c 2010-09-23 11:57:57 UTC (rev 2393)
+++ trunk/utils/inputattach.c 2010-09-23 12:00:54 UTC (rev 2394)
@@ -281,10 +281,10 @@
int count, line;
/* Turn DTR off, otherwise the Twiddler won't send any data. */
- if (ioctl(fd, TIOCMGET, &line))
+ if (ioctl(fd, TIOCMGET, &line) < 0)
return -1;
line &= ~TIOCM_DTR;
- if (ioctl(fd, TIOCMSET, &line))
+ if (ioctl(fd, TIOCMSET, &line) < 0)
return -1;
/*
@@ -648,14 +648,14 @@
}
ldisc = N_MOUSE;
- if (ioctl(fd, TIOCSETD, &ldisc)) {
+ if (ioctl(fd, TIOCSETD, &ldisc) < 0) {
fprintf(stderr, "inputattach: can't set line discipline\n");
return EXIT_FAILURE;
}
devt = type->type | (id << 8) | (extra << 16);
- if (ioctl(fd, SPIOCSTYPE, &devt)) {
+ if (ioctl(fd, SPIOCSTYPE, &devt) < 0) {
fprintf(stderr, "inputattach: can't set device type\n");
return EXIT_FAILURE;
}
Modified: trunk/utils/jscal.c
===================================================================
--- trunk/utils/jscal.c 2010-09-23 11:57:57 UTC (rev 2393)
+++ trunk/utils/jscal.c 2010-09-23 12:00:54 UTC (rev 2394)
@@ -179,15 +179,15 @@
{
int i,j;
- if (ioctl(fd, JSIOCGAXES, &axes)) {
+ if (ioctl(fd, JSIOCGAXES, &axes) < 0) {
perror("jscal: error getting axes");
exit(1);
}
- if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons) < 0) {
perror("jscal: error getting buttons");
exit(1);
}
- if (ioctl(fd, JSIOCGCORR, &corr)) {
+ if (ioctl(fd, JSIOCGCORR, &corr) < 0) {
perror("jscal: error getting correction");
exit(1);
}
@@ -218,7 +218,7 @@
corr[i].prec = 0;
}
- if (ioctl(fd, JSIOCSCORR, &corr)) {
+ if (ioctl(fd, JSIOCSCORR, &corr) < 0) {
perror("jscal: error setting correction");
exit(1);
}
@@ -324,7 +324,7 @@
putchar('\n');
- if (ioctl(fd, JSIOCSCORR, &corr)) {
+ if (ioctl(fd, JSIOCSCORR, &corr) < 0) {
perror("jscal: error setting correction");
exit(1);
}
@@ -342,19 +342,19 @@
{
int i;
- if (ioctl(fd, JSIOCGAXES, &axes)) {
+ if (ioctl(fd, JSIOCGAXES, &axes) < 0) {
perror("jscal: error getting axes");
exit(1);
}
- if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons) < 0) {
perror("jscal: error getting buttons");
exit(1);
}
- if (ioctl(fd, JSIOCGAXMAP, &axmap)) {
+ if (ioctl(fd, JSIOCGAXMAP, &axmap) < 0) {
perror("jscal: error getting axis map");
exit(1);
}
- if (ioctl(fd, JSIOCGBTNMAP, &buttonmap)) {
+ if (ioctl(fd, JSIOCGBTNMAP, &buttonmap) < 0) {
buttons=0;
}
@@ -376,7 +376,7 @@
void get_axmap2(void)
{
- if (ioctl(fd, JSIOCGAXMAP, &axmap2)) {
+ if (ioctl(fd, JSIOCGAXMAP, &axmap2) < 0) {
perror("jscal: error getting axis map");
exit(1);
}
@@ -400,7 +400,7 @@
ax[i]=axmes[(axmap[i])];
}
//Read again current callibration settings
- if (ioctl(fd, JSIOCGCORR, &corr)) {
+ if (ioctl(fd, JSIOCGCORR, &corr) < 0) {
perror("jscal: error getting correction");
exit(1);
}
@@ -408,7 +408,7 @@
for (i = 0; i < axes; i++) {
corr_tmp[i]=corr[(ax[i])];
}
- if (ioctl(fd, JSIOCSCORR, &corr_tmp)) {
+ if (ioctl(fd, JSIOCSCORR, &corr_tmp) < 0) {
perror("jscal: error setting correction");
exit(1);
}
@@ -419,15 +419,15 @@
{
int i,j;
- if (ioctl(fd, JSIOCGAXES, &axes)) {
+ if (ioctl(fd, JSIOCGAXES, &axes) < 0) {
perror("jscal: error getting axes");
exit(1);
}
- if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons) < 0) {
perror("jscal: error getting buttons");
exit(1);
}
- if (ioctl(fd, JSIOCGCORR, &corr)) {
+ if (ioctl(fd, JSIOCGCORR, &corr) < 0) {
perror("jscal: error getting correction");
exit(1);
}
@@ -451,11 +451,11 @@
int axis_mapping = 0;
int btn_mapping = 0;
- if (ioctl(fd, JSIOCGAXES, &axes)) {
+ if (ioctl(fd, JSIOCGAXES, &axes) < 0) {
perror("jscal: error getting axes");
exit(1);
}
- if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons) < 0) {
perror("jscal: error getting buttons");
exit(1);
}
@@ -536,7 +536,7 @@
get_axmap2();
// Apply the new axis map
- if (ioctl(fd, JSIOCSAXMAP, &axmap)) {
+ if (ioctl(fd, JSIOCSAXMAP, &axmap) < 0) {
perror("jscal: error setting axis map");
exit(1);
}
@@ -545,7 +545,7 @@
correct_axes();
if (btns_on_cl!=0){
- if (ioctl(fd, JSIOCSBTNMAP, &buttonmap)) {
+ if (ioctl(fd, JSIOCSBTNMAP, &buttonmap) < 0) {
perror("jscal: error setting button map");
exit(1);
}
@@ -557,7 +557,7 @@
int i,j;
int t = 0;
- if (ioctl(fd, JSIOCGAXES, &axes)) {
+ if (ioctl(fd, JSIOCGAXES, &axes) < 0) {
perror("jscal: error getting axes");
exit(1);
}
@@ -618,7 +618,7 @@
exit(1);
}
- if (ioctl(fd, JSIOCSCORR, &corr)) {
+ if (ioctl(fd, JSIOCSCORR, &corr) < 0) {
perror("jscal: error setting correction");
exit(1);
}
@@ -629,12 +629,12 @@
int i;
struct js_event ev;
- if (ioctl(fd, JSIOCGAXES, &axes)) {
+ if (ioctl(fd, JSIOCGAXES, &axes) < 0) {
perror("jscal: error getting axes");
exit(1);
}
- if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons) < 0) {
perror("jscal: error getting buttons");
exit(1);
}
@@ -735,7 +735,7 @@
exit(1);
}
- if (ioctl(fd, JSIOCGVERSION, &version)) {
+ if (ioctl(fd, JSIOCGVERSION, &version) < 0) {
perror("jscal: error getting version");
exit(1);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:58:04
|
Revision: 2393
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2393&view=rev
Author: skitt
Date: 2010-09-23 11:57:57 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Handle both known versions of KEY_MAX when retrieving the button map;
avoid segfaulting in any case!
Modified Paths:
--------------
trunk/utils/Makefile
trunk/utils/jstest.c
Added Paths:
-----------
trunk/utils/axbtnmap.c
trunk/utils/axbtnmap.h
Modified: trunk/utils/Makefile
===================================================================
--- trunk/utils/Makefile 2010-09-23 11:56:32 UTC (rev 2392)
+++ trunk/utils/Makefile 2010-09-23 11:57:57 UTC (rev 2393)
@@ -50,9 +50,17 @@
ffmvforce: ffmvforce.o
$(CC) $^ -o $@ $(LDFLAGS) -g -lm `sdl-config --libs`
-jscal: jscal.o
+axbtnmap.o: axbtnmap.c axbtnmap.h
+
+jscal.o: jscal.c axbtnmap.h
+
+jscal: jscal.o axbtnmap.o
$(CC) $(CFLAGS) $(CPPFLAGS) -lm $^ -o $@
+jstest.o: jstest.c axbtnmap.h
+
+jstest: jstest.o axbtnmap.o
+
gencodes: gencodes.c scancodes.h
$(CC) $(CFLAGS) $(CPPFLAGS) gencodes.c -o gencodes
Added: trunk/utils/axbtnmap.c
===================================================================
--- trunk/utils/axbtnmap.c (rev 0)
+++ trunk/utils/axbtnmap.c 2010-09-23 11:57:57 UTC (rev 2393)
@@ -0,0 +1,89 @@
+/*
+ * Axis and button map support functions.
+ * Copyright © 2009 Stephen Kitt <st...@sk...>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <errno.h>
+#include <stdint.h>
+
+#include <sys/ioctl.h>
+#include <sys/types.h>
+
+#include <linux/input.h>
+#include <linux/joystick.h>
+
+#include "axbtnmap.h"
+
+/* The following values come from include/joystick.h in the kernel source. */
+#define JSIOCSBTNMAP_LARGE _IOW('j', 0x33, __u16[KEY_MAX_LARGE - BTN_MISC + 1])
+#define JSIOCSBTNMAP_SMALL _IOW('j', 0x33, __u16[KEY_MAX_SMALL - BTN_MISC + 1])
+#define JSIOCGBTNMAP_LARGE _IOR('j', 0x34, __u16[KEY_MAX_LARGE - BTN_MISC + 1])
+#define JSIOCGBTNMAP_SMALL _IOR('j', 0x34, __u16[KEY_MAX_SMALL - BTN_MISC + 1])
+
+int determine_ioctl(int fd, int *ioctls, int *ioctl_used, void *argp)
+{
+ int i, retval = 0;
+
+ /* Try each ioctl in turn. */
+ for (i = 0; ioctls[i]; i++) {
+ if ((retval = ioctl(fd, ioctls[i], argp)) >= 0) {
+ /* The ioctl did something. */
+ *ioctl_used = ioctls[i];
+ return retval;
+ } else if (errno != -EINVAL) {
+ /* Some other error occurred. */
+ return retval;
+ }
+ }
+ return retval;
+}
+
+int getbtnmap(int fd, uint16_t *btnmap)
+{
+ static int jsiocgbtnmap = 0;
+ int ioctls[] = { JSIOCGBTNMAP, JSIOCGBTNMAP_LARGE, JSIOCGBTNMAP_SMALL, 0 };
+
+ if (jsiocgbtnmap != 0) {
+ /* We already know which ioctl to use. */
+ return ioctl(fd, jsiocgbtnmap, btnmap);
+ } else {
+ return determine_ioctl(fd, ioctls, &jsiocgbtnmap, btnmap);
+ }
+}
+
+int setbtnmap(int fd, uint16_t *btnmap)
+{
+ static int jsiocsbtnmap = 0;
+ int ioctls[] = { JSIOCSBTNMAP, JSIOCSBTNMAP_LARGE, JSIOCSBTNMAP_SMALL, 0 };
+
+ if (jsiocsbtnmap != 0) {
+ /* We already know which ioctl to use. */
+ return ioctl(fd, jsiocsbtnmap, btnmap);
+ } else {
+ return determine_ioctl(fd, ioctls, &jsiocsbtnmap, btnmap);
+ }
+}
+
+int getaxmap(int fd, uint8_t *axmap)
+{
+ return ioctl(fd, JSIOCGAXMAP, axmap);
+}
+
+int setaxmap(int fd, uint8_t *axmap)
+{
+ return ioctl(fd, JSIOCSAXMAP, axmap);
+}
Added: trunk/utils/axbtnmap.h
===================================================================
--- trunk/utils/axbtnmap.h (rev 0)
+++ trunk/utils/axbtnmap.h 2010-09-23 11:57:57 UTC (rev 2393)
@@ -0,0 +1,65 @@
+/*
+ * Axis and button map support functions.
+ * Copyright © 2009 Stephen Kitt <st...@sk...>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __AXBTNMAP_H__
+#define __AXBTNMAP_H__
+
+#include <stdint.h>
+#include <linux/input.h>
+
+/* The following values come from include/input.h in the kernel
+ source; the small variant is used up to version 2.6.27, the large
+ one from 2.6.28 onwards. We need to handle both values because the
+ kernel doesn't; it only expects one of the values, and we need to
+ determine which one at run-time. */
+#define KEY_MAX_LARGE 0x2FF
+#define KEY_MAX_SMALL 0x1FF
+
+/* Axis map size. */
+#define AXMAP_SIZE (ABS_MAX + 1)
+
+/* Button map size. */
+#define BTNMAP_SIZE (KEY_MAX_LARGE - BTN_MISC + 1)
+
+/* Retrieves the current axis map in the given array, which must
+ contain at least AXMAP_SIZE elements. Returns the result of the
+ ioctl(): negative in case of an error, 0 otherwise for kernels up
+ to 2.6.30, the length of the array actually copied for later
+ kernels. */
+int getaxmap(int fd, uint8_t *axmap);
+
+/* Uses the given array as the axis map. The array must contain at
+ least AXMAP_SIZE elements. Returns the result of the ioctl():
+ negative in case of an error, 0 otherwise. */
+int setaxmap(int fd, uint8_t *axmap);
+
+/* Retrieves the current button map in the given array, which must
+ contain at least BTNMAP_SIZE elements. Returns the result of the
+ ioctl(): negative in case of an error, 0 otherwise for kernels up
+ to 2.6.30, the length of the array actually copied for later
+ kernels. */
+int getbtnmap(int fd, uint16_t *btnmap);
+
+/* Uses the given array as the button map. The array must contain at
+ least BTNMAP_SIZE elements. Returns the result of the ioctl():
+ negative in case of an error, 0 otherwise. */
+int setbtnmap(int fd, uint16_t *btnmap);
+
+#endif
+
Modified: trunk/utils/jstest.c
===================================================================
--- trunk/utils/jstest.c 2010-09-23 11:56:32 UTC (rev 2392)
+++ trunk/utils/jstest.c 2010-09-23 11:57:57 UTC (rev 2393)
@@ -49,6 +49,8 @@
#include <linux/input.h>
#include <linux/joystick.h>
+#include "axbtnmap.h"
+
char *axis_names[ABS_MAX + 1] = {
"X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder",
"Wheel", "Gas", "Brake", "?", "?", "?", "?", "?",
@@ -74,8 +76,9 @@
unsigned char buttons = 2;
int version = 0x000800;
char name[NAME_LENGTH] = "Unknown";
- uint16_t btnmap[KEY_MAX - BTN_MISC + 1];
- uint8_t axmap[ABS_MAX + 1];
+ uint16_t btnmap[BTNMAP_SIZE];
+ uint8_t axmap[AXMAP_SIZE];
+ int btnmapok = 1;
if (argc < 2 || argc > 3 || !strcmp("--help", argv[1])) {
puts("");
@@ -99,15 +102,23 @@
ioctl(fd, JSIOCGAXES, &axes);
ioctl(fd, JSIOCGBUTTONS, &buttons);
ioctl(fd, JSIOCGNAME(NAME_LENGTH), name);
- ioctl(fd, JSIOCGAXMAP, axmap);
- ioctl(fd, JSIOCGBTNMAP, btnmap);
+ getaxmap(fd, axmap);
+ getbtnmap(fd, btnmap);
printf("Driver version is %d.%d.%d.\n",
version >> 16, (version >> 8) & 0xff, version & 0xff);
- if (buttons > 0 && btnmap[0] < BTN_MISC) {
+ /* Determine whether the button map is usable. */
+ for (i = 0; btnmapok && i < buttons; i++) {
+ if (btnmap[i] < BTN_MISC || btnmap[i] > KEY_MAX) {
+ btnmapok = 0;
+ break;
+ }
+ }
+ if (!btnmapok) {
/* btnmap out of range for names. Don't print any. */
+ puts("jstest is not fully compatible with your kernel. Unable to retrieve button map!");
printf("Joystick (%s) has %d axes ", name, axes);
printf("and %d buttons.\n", buttons);
} else {
@@ -117,8 +128,9 @@
puts(")");
printf("and %d buttons (", buttons);
- for (i = 0; i < buttons; i++)
+ for (i = 0; i < buttons; i++) {
printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]);
+ }
puts(").");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:56:41
|
Revision: 2392
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2392&view=rev
Author: skitt
Date: 2010-09-23 11:56:32 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
When applying an axis map, carry calibration data over to the new axis
assignments. Patch provided by Krzysztof A. Sobiecki; see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529865
Modified Paths:
--------------
trunk/utils/jscal.c
Modified: trunk/utils/jscal.c
===================================================================
--- trunk/utils/jscal.c 2010-09-23 11:54:38 UTC (rev 2391)
+++ trunk/utils/jscal.c 2010-09-23 11:56:32 UTC (rev 2392)
@@ -62,6 +62,7 @@
int fd;
struct js_corr corr[MAX_AXES];
__u8 axmap[ABS_MAX + 1];
+__u8 axmap2[ABS_MAX + 1];
__u16 buttonmap[(KEY_MAX - BTN_MISC + 1)];
char axes, buttons, fuzz;
int version;
@@ -354,8 +355,7 @@
exit(1);
}
if (ioctl(fd, JSIOCGBTNMAP, &buttonmap)) {
- perror("jscal: error getting button map");
- exit(1);
+ buttons=0;
}
printf("jscal -u %d", axes);
@@ -373,6 +373,48 @@
printf(" %s\n",devicename);
}
+
+void get_axmap2(void)
+{
+ if (ioctl(fd, JSIOCGAXMAP, &axmap2)) {
+ perror("jscal: error getting axis map");
+ exit(1);
+ }
+}
+
+/*
+ * Remap the calibration data to fit the (potentially) new axis map.
+ * axmap2 stores the original axis map, axmap the new one.
+ */
+void correct_axes(void)
+{
+ int axmes[ABS_MAX + 1];
+ struct js_corr corr_tmp[MAX_AXES];
+ int i;
+ int ax[axes];
+ //Create remapping table
+ for(i=0;i<axes;++i){
+ axmes[(axmap2[i])]=i;
+ }
+ for(i=0;i<axes;++i){
+ ax[i]=axmes[(axmap[i])];
+ }
+ //Read again current callibration settings
+ if (ioctl(fd, JSIOCGCORR, &corr)) {
+ perror("jscal: error getting correction");
+ exit(1);
+ }
+ //Remap callibration settings
+ for (i = 0; i < axes; i++) {
+ corr_tmp[i]=corr[(ax[i])];
+ }
+ if (ioctl(fd, JSIOCSCORR, &corr_tmp)) {
+ perror("jscal: error setting correction");
+ exit(1);
+ }
+
+}
+
void print_settings(char *devicename)
{
int i,j;
@@ -425,7 +467,7 @@
exit(1);
}
- //axes
+ //axes
sscanf(p, "%d", &axes_on_cl);
p = strstr(p, ",");
@@ -457,15 +499,15 @@
sscanf(++p, "%d", &btns_on_cl);
p = strstr(p, ",");
- if (btns_on_cl != buttons) {
+ if ((btns_on_cl != buttons)&&(btns_on_cl!=0)) {
fprintf(stderr, "jscal: joystick has %d buttons and not %d as specified on command line\n",
buttons, btns_on_cl);
exit(1);
}
- for (i = 0; i < buttons; i++)
- {
+ for (i = 0; i < btns_on_cl; i++)
+ {
if (!p) {
fprintf(stderr, "jscal: missing mapping for button %d\n", i);
exit(1);
@@ -483,21 +525,31 @@
exit(1);
}
buttonmap[i] = btn_mapping;
- }
+ }
if (p) {
fprintf(stderr, "jscal: too many values\n");
exit(1);
}
+
+ // Save the current axis map
+ get_axmap2();
+ // Apply the new axis map
if (ioctl(fd, JSIOCSAXMAP, &axmap)) {
perror("jscal: error setting axis map");
exit(1);
}
- if (ioctl(fd, JSIOCSBTNMAP, &buttonmap)) {
- perror("jscal: error setting button map");
- exit(1);
- }
+
+ // Move the calibration data accordingly
+ correct_axes();
+
+ if (btns_on_cl!=0){
+ if (ioctl(fd, JSIOCSBTNMAP, &buttonmap)) {
+ perror("jscal: error setting button map");
+ exit(1);
+ }
+ }
}
void set_correction(char *p)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:54:45
|
Revision: 2391
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2391&view=rev
Author: skitt
Date: 2010-09-23 11:54:38 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Updates the identifiers in serio-ids.h to conform to those used in serio.h
as shipped in kernel 2.6.29.
Modified Paths:
--------------
trunk/utils/serio-ids.h
Modified: trunk/utils/serio-ids.h
===================================================================
--- trunk/utils/serio-ids.h 2010-09-23 11:53:44 UTC (rev 2390)
+++ trunk/utils/serio-ids.h 2010-09-23 11:54:38 UTC (rev 2391)
@@ -104,8 +104,23 @@
#ifndef SERIO_TOUCHWIN
# define SERIO_TOUCHWIN 0x33
#endif
+#ifndef SERIO_TAOSEVM
+# define SERIO_TAOSEVM 0x34
+#endif
#ifndef SERIO_FUJITSU
-# define SERIO_FUJITSU 0x34
+# define SERIO_FUJITSU 0x35
#endif
+#ifndef SERIO_ZHENHUA
+# define SERIO_ZHENHUA 0x36
+#endif
+#ifndef SERIO_INEXIO
+# define SERIO_INEXIO 0x37
+#endif
+#ifndef SERIO_TOUCHIT213
+# define SERIO_TOUCHIT213 0x38
+#endif
+#ifndef SERIO_W8001
+# define SERIO_W8001 0x39
+#endif
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:53:50
|
Revision: 2390
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2390&view=rev
Author: skitt
Date: 2010-09-23 11:53:44 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Add an inputattach mode for the Sahara Touch-iT213 and options --always and
--noinit; patch taken from
https://bugs.launchpad.net/ubuntu/+source/inputattach/+bug/338746
Modified Paths:
--------------
trunk/utils/inputattach.c
Modified: trunk/utils/inputattach.c
===================================================================
--- trunk/utils/inputattach.c 2010-09-23 11:47:58 UTC (rev 2389)
+++ trunk/utils/inputattach.c 2010-09-23 11:53:44 UTC (rev 2390)
@@ -7,6 +7,8 @@
*
* Twiddler support Copyright (c) 2001 Arndt Schoenewald
* Sponsored by Quelltext AG (http://www.quelltext-ag.de), Dortmund, Germany
+ *
+ * Sahara Touchit-213 mode added by Claudio Nieder 2008-05-01.
*/
/*
@@ -33,25 +35,18 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
#include <linux/serio.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-
+#include "serio-ids.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <termios.h>
#include <unistd.h>
-#include <fcntl.h>
-#include <termios.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <ctype.h>
-#include "serio-ids.h"
-
static int readchar(int fd, unsigned char *c, int timeout)
{
struct timeval tv;
@@ -121,7 +116,7 @@
return 0;
}
-static int spaceball_waitchar(int fd, unsigned char c, unsigned char *d,
+static int spaceball_waitchar(int fd, unsigned char c, char *d,
int timeout)
{
unsigned char b = 0;
@@ -240,7 +235,7 @@
{
int i;
unsigned char c;
- unsigned char *response = "\r\n0600520058C272";
+ unsigned char *response = (unsigned char *)"\r\n0600520058C272";
if (write(fd, " E5E5", 5) != 5) /* Enable command */
return -1;
@@ -362,6 +357,52 @@
return 0;
}
+static int t213_init(int fd, unsigned long *id, unsigned long *extra)
+{
+ char cmd[]={0x0a,1,'A'};
+ int count=10;
+ int state=0;
+ unsigned char data;
+
+ /*
+ * In case the controller is in "ELO-mode" send a few times
+ * the check active packet to force it into the documented
+ * touchkit mode.
+ */
+ while (count>0) {
+ if (write(fd, &cmd, 3) != 3)
+ return -1;
+ while (!readchar(fd, &data, 100)) {
+ switch (state) {
+ case 0:
+ if (data==0x0a) {
+ state=1;
+ }
+ break;
+ case 1:
+ if (data==1) {
+ state=2;
+ } else if (data!=0x0a) {
+ state=0;
+ }
+ break;
+ case 2:
+ if (data=='A') {
+ return 0;
+ } else if (data==0x0a) {
+ state=1;
+ } else {
+ state=0;
+ }
+ break;
+ }
+
+ }
+ count--;
+ }
+ return -1;
+}
+
static int dump_init(int fd, unsigned long *id, unsigned long *extra)
{
unsigned char c, o = 0;
@@ -480,6 +521,9 @@
{ "--mtouch", "-mtouch", "MicroTouch (3M) touchscreen",
B9600, CS8 | CRTSCTS,
SERIO_MICROTOUCH, 0x00, 0x00, 0, NULL },
+{ "--touchit213", "-t213", "Sahara Touch-iT213 Tablet PC",
+ B9600, CS8,
+ SERIO_TOUCHIT213, 0x00, 0x00, 0, t213_init },
{ "--touchright", "-tr", "Touchright serial touchscreen",
B9600, CS8 | CRTSCTS,
SERIO_TOUCHRIGHT, 0x00, 0x00, 0, NULL },
@@ -503,7 +547,7 @@
struct input_types *type;
puts("");
- puts("Usage: inputattach [--daemon] <mode> <device>");
+ puts("Usage: inputattach [--daemon] [--always] [--noinit] <mode> <device>");
puts("");
puts("Modes:");
@@ -525,8 +569,10 @@
unsigned long id, extra;
int fd;
int i;
- char c;
+ unsigned char c;
int retval;
+ int ignore_init_res = 0;
+ int no_init = 0;
for (i = 1; i < argc; i++) {
if (!strcasecmp(argv[i], "--help")) {
@@ -534,6 +580,10 @@
return EXIT_SUCCESS;
} else if (!strcasecmp(argv[i], "--daemon")) {
daemon_mode = 1;
+ } else if (!strcasecmp(argv[i], "--always")) {
+ ignore_init_res = 1;
+ } else if (!strcasecmp(argv[i], "--noinit")) {
+ no_init = 1;
} else if (need_device) {
device = argv[i];
need_device = 0;
@@ -586,9 +636,15 @@
id = type->id;
extra = type->extra;
- if (type->init && type->init(fd, &id, &extra)) {
- fprintf(stderr, "inputattach: device initialization failed\n");
- return EXIT_FAILURE;
+ if (type->init && !no_init) {
+ if (type->init(fd, &id, &extra)) {
+ if (ignore_init_res) {
+ fprintf(stderr, "inputattach: ignored device initialization failure\n");
+ } else {
+ fprintf(stderr, "inputattach: device initialization failed\n");
+ return EXIT_FAILURE;
+ }
+ }
}
ldisc = N_MOUSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:48:04
|
Revision: 2389
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2389&view=rev
Author: skitt
Date: 2010-09-23 11:47:58 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Fix the buffer size passed to the EVIOCGBIT ioctl; patch provided by
Sebastian Siewior, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499414 and
http://userweb.kernel.org/~dtor/eviocgbit-bug.html
Modified Paths:
--------------
trunk/utils/evtest.c
Modified: trunk/utils/evtest.c
===================================================================
--- trunk/utils/evtest.c 2010-09-23 11:46:42 UTC (rev 2388)
+++ trunk/utils/evtest.c 2010-09-23 11:47:58 UTC (rev 2389)
@@ -333,14 +333,14 @@
printf("Input device name: \"%s\"\n", name);
memset(bit, 0, sizeof(bit));
- ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
+ ioctl(fd, EVIOCGBIT(0, sizeof(bit[0])), bit[0]);
printf("Supported events:\n");
for (i = 0; i < EV_MAX; i++)
if (test_bit(i, bit[0])) {
printf(" Event type %d (%s)\n", i, events[i] ? events[i] : "?");
if (!i) continue;
- ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
+ ioctl(fd, EVIOCGBIT(i, sizeof(bit[0])), bit[i]);
for (j = 0; j < KEY_MAX; j++)
if (test_bit(j, bit[i])) {
printf(" Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:46:48
|
Revision: 2388
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2388&view=rev
Author: skitt
Date: 2010-09-23 11:46:42 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Avoid segfaulting with certain USB joysticks. Patch taken from the Ubuntu
package.
Modified Paths:
--------------
trunk/utils/jstest.c
Modified: trunk/utils/jstest.c
===================================================================
--- trunk/utils/jstest.c 2010-09-23 11:45:44 UTC (rev 2387)
+++ trunk/utils/jstest.c 2010-09-23 11:46:42 UTC (rev 2388)
@@ -106,15 +106,21 @@
printf("Driver version is %d.%d.%d.\n",
version >> 16, (version >> 8) & 0xff, version & 0xff);
- printf("Joystick (%s) has %d axes (", name, axes);
- for (i = 0; i < axes; i++)
- printf("%s%s", i > 0 ? ", " : "", axis_names[axmap[i]]);
- puts(")");
+ if (buttons > 0 && btnmap[0] < BTN_MISC) {
+ /* btnmap out of range for names. Don't print any. */
+ printf("Joystick (%s) has %d axes ", name, axes);
+ printf("and %d buttons.\n", buttons);
+ } else {
+ printf("Joystick (%s) has %d axes (", name, axes);
+ for (i = 0; i < axes; i++)
+ printf("%s%s", i > 0 ? ", " : "", axis_names[axmap[i]]);
+ puts(")");
- printf("and %d buttons (", buttons);
- for (i = 0; i < buttons; i++)
- printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]);
- puts(").");
+ printf("and %d buttons (", buttons);
+ for (i = 0; i < buttons; i++)
+ printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]);
+ puts(").");
+ }
printf("Testing ... (interrupt to exit)\n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:45:50
|
Revision: 2387
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2387&view=rev
Author: skitt
Date: 2010-09-23 11:45:44 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Add axis and button remapping. Patch provided by Dr. L?\195?\161szl?\195?\179 Kaj?\195?\161n; see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=444142
Modified Paths:
--------------
trunk/utils/jscal.c
Modified: trunk/utils/jscal.c
===================================================================
--- trunk/utils/jscal.c 2010-09-23 11:44:06 UTC (rev 2386)
+++ trunk/utils/jscal.c 2010-09-23 11:45:44 UTC (rev 2387)
@@ -61,6 +61,8 @@
int fd;
struct js_corr corr[MAX_AXES];
+__u8 axmap[ABS_MAX + 1];
+__u16 buttonmap[(KEY_MAX - BTN_MISC + 1)];
char axes, buttons, fuzz;
int version;
struct correction_data corda[MAX_AXES];
@@ -163,6 +165,12 @@
puts(" -V --version Prints the version numbers");
puts(" -p --print-correction Prints the current settings as a jscal");
puts(" command line");
+ puts(" -q --print-mappings Print the current axis and button");
+ puts(" mappings as a jscal command line");
+ puts(" -u <n_of_axes,axmap1,axmap2,...,");
+ puts(" n_of_buttons,btnmap1,btnmap2,");
+ puts(" ...> --set-mappings Sets axis and button mappings to the");
+ puts(" specified values");
putchar('\n');
}
@@ -329,6 +337,42 @@
(version >> 8) & 0xff, version & 0xff);
}
+void print_mappings(char *devicename)
+{
+ int i;
+
+ if (ioctl(fd, JSIOCGAXES, &axes)) {
+ perror("jscal: error getting axes");
+ exit(1);
+ }
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ perror("jscal: error getting buttons");
+ exit(1);
+ }
+ if (ioctl(fd, JSIOCGAXMAP, &axmap)) {
+ perror("jscal: error getting axis map");
+ exit(1);
+ }
+ if (ioctl(fd, JSIOCGBTNMAP, &buttonmap)) {
+ perror("jscal: error getting button map");
+ exit(1);
+ }
+
+ printf("jscal -u %d", axes);
+ for (i = 0; i < axes; i++)
+ {
+ printf( ",%d", axmap[i]);
+ }
+
+ printf(",%d", buttons);
+ for (i = 0; i < buttons; i++)
+ {
+ printf( ",%d", buttonmap[i]);
+ }
+
+ printf(" %s\n",devicename);
+}
+
void print_settings(char *devicename)
{
int i,j;
@@ -355,6 +399,107 @@
printf(" %s\n",devicename);
}
+// n axes n buttons
+// 10,0,1,2,5,6,16,17,40,41,42:13,288,289,290,291,292,293,294,295,296,297,298,299,300
+void set_mappings(char *p)
+{
+ int i;
+ int axes_on_cl = 0;
+ int btns_on_cl = 0;
+ int axis_mapping = 0;
+ int btn_mapping = 0;
+
+ if (ioctl(fd, JSIOCGAXES, &axes)) {
+ perror("jscal: error getting axes");
+ exit(1);
+ }
+ if (ioctl(fd, JSIOCGBUTTONS, &buttons)) {
+ perror("jscal: error getting buttons");
+ exit(1);
+ }
+
+ if (axes > MAX_AXES) axes = MAX_AXES;
+
+ if (!p) {
+ fprintf(stderr, "jscal: missing argument for --set-mappings\n");
+ exit(1);
+ }
+
+ //axes
+ sscanf(p, "%d", &axes_on_cl);
+ p = strstr(p, ",");
+
+ if (axes_on_cl != axes) {
+ fprintf(stderr, "jscal: joystick has %d axes and not %d as specified on command line\n",
+ axes, axes_on_cl);
+ exit(1);
+ }
+
+
+ for (i = 0; i < axes; i++)
+ {
+ if (!p) {
+ fprintf(stderr, "jscal: missing mapping for axis %d\n", i);
+ exit(1);
+ }
+ sscanf(++p, "%d", &axis_mapping);
+ p = strstr(p, ",");
+
+
+ if (axis_mapping > ABS_MAX + 1) {
+ fprintf(stderr, "jscal: invalid axis mapping for axis %d (max is %d)\n", i, ABS_MAX + 1);
+ exit(1);
+ }
+ axmap[i] = axis_mapping;
+ }
+
+ //buttons
+ sscanf(++p, "%d", &btns_on_cl);
+ p = strstr(p, ",");
+
+ if (btns_on_cl != buttons) {
+ fprintf(stderr, "jscal: joystick has %d buttons and not %d as specified on command line\n",
+ buttons, btns_on_cl);
+ exit(1);
+ }
+
+
+ for (i = 0; i < buttons; i++)
+ {
+ if (!p) {
+ fprintf(stderr, "jscal: missing mapping for button %d\n", i);
+ exit(1);
+ }
+ sscanf(++p, "%d", &btn_mapping);
+ p = strstr(p, ",");
+
+
+ if (btn_mapping > KEY_MAX) {
+ fprintf(stderr, "jscal: invalid button mapping for button %d (max is %d)\n", i, KEY_MAX);
+ exit(1);
+ }
+ if (btn_mapping < BTN_MISC) {
+ fprintf(stderr, "jscal: invalid button mapping for button %d (min is %d)\n", i, BTN_MISC);
+ exit(1);
+ }
+ buttonmap[i] = btn_mapping;
+ }
+
+ if (p) {
+ fprintf(stderr, "jscal: too many values\n");
+ exit(1);
+ }
+
+ if (ioctl(fd, JSIOCSAXMAP, &axmap)) {
+ perror("jscal: error setting axis map");
+ exit(1);
+ }
+ if (ioctl(fd, JSIOCSBTNMAP, &buttonmap)) {
+ perror("jscal: error setting button map");
+ exit(1);
+ }
+}
+
void set_correction(char *p)
{
int i,j;
@@ -474,14 +619,18 @@
char *parameter = NULL;
int t;
+ // /usr/include/getopt.h
static struct option long_options[] =
{
{"calibrate", no_argument, NULL, 'c'},
{"help", no_argument, NULL, 'h'},
{"set-correction", required_argument, NULL, 's'},
+ {"set-mappings", required_argument, NULL, 'u'},
{"test-center", no_argument, NULL, 't'},
{"version", no_argument, NULL, 'V'},
- {"print-correction", no_argument, NULL, 'p'}
+ {"print-correction", no_argument, NULL, 'p'},
+ {"print-mappings", no_argument, NULL, 'q'},
+ {NULL, no_argument, NULL, 0 }
};
if (argc == 1) {
@@ -490,10 +639,12 @@
}
do {
- t = getopt_long(argc, argv, "chps:vVt", long_options, &option_index);
+ t = getopt_long(argc, argv, "chpqu:s:vVt", long_options, &option_index);
switch (t) {
case 'p':
+ case 'q':
case 's':
+ case 'u':
case 'c':
case 't':
case 'V':
@@ -553,9 +704,15 @@
case 'p':
print_settings(argv[argc -1]);
break;
+ case 'q':
+ print_mappings(argv[argc -1]);
+ break;
case 's':
set_correction(parameter);
break;
+ case 'u':
+ set_mappings(parameter);
+ break;
case 't':
test_center();
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sk...@us...> - 2010-09-23 11:44:12
|
Revision: 2386
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2386&view=rev
Author: skitt
Date: 2010-09-23 11:44:06 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Improve jitter tolerance; patch provided by Johann Walles, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=144768
Modified Paths:
--------------
trunk/utils/jscal.c
Modified: trunk/utils/jscal.c
===================================================================
--- trunk/utils/jscal.c 2010-09-23 11:41:12 UTC (rev 2385)
+++ trunk/utils/jscal.c 2010-09-23 11:44:06 UTC (rev 2386)
@@ -202,6 +202,7 @@
void calibrate()
{
int i, j, t, b;
+ int axis, pos;
for (i=0; i<MAX_AXES; i++) {
corr[i].type = JS_CORR_NONE;
@@ -232,13 +233,19 @@
do {
wait_for_event(fd, &js);
for(i=0; i < axes; i++) {
- if (amin[i] > js.axis[i]) amin[i] = js.axis[i];
- if (amax[i] < js.axis[i]) amax[i] = js.axis[i];
+ if (amin[i] > js.axis[i]) {
+ amin[i] = js.axis[i];
+ t = get_time();
+ }
+ if (amax[i] < js.axis[i]) {
+ amax[i] = js.axis[i];
+ t = get_time();
+ }
printf("Axis %d:%5d,%5d ", i, amin[i], amax[i]);
}
printf("\r");
fflush(stdout);
- } while (get_time() < t+2000);
+ } while (get_time() < t+4000);
printf("Done. Precision is: \n");
@@ -254,30 +261,36 @@
b = js.buttons;
- for (j = 0; j < axes; j++)
- for (i = 0; i < NUM_POS; i++) {
- while(b ^ js.buttons) wait_for_event(fd, &js);
- printf("Move axis %d to %s position and push any button.\n", j, pos_name[i]);
+ for (axis = 0; axis < axes; axis++)
+ for (pos = 0; pos < NUM_POS; pos++) {
+ while(b ^ js.buttons) wait_for_event(fd, &js);
+ printf("Move axis %d to %s position and push any button.\n", axis, pos_name[pos]);
- while (!(b ^ js.buttons)) {
- print_position(j, js.axis[j]);
- wait_for_event(fd, &js);
- }
+ while (!(b ^ js.buttons)) {
+ print_position(axis, js.axis[axis]);
+ wait_for_event(fd, &js);
+ }
- putcs("Hold ... ");
+ putcs("Hold ... ");
- corda[j].cmin[i] = js.axis[j];
- corda[j].cmax[i] = js.axis[j];
+ corda[axis].cmin[pos] = js.axis[axis];
+ corda[axis].cmax[pos] = js.axis[axis];
- t = get_time();
+ t = get_time();
- while (get_time() < t + 2000 && (b ^ js.buttons)) {
- if (js.axis[j] < corda[j].cmin[i]) corda[j].cmin[i] = js.axis[j];
- if (js.axis[j] > corda[j].cmax[i]) corda[j].cmax[i] = js.axis[j];
- wait_for_event(fd, &js);
+ while (get_time() < t + 2000 && (b ^ js.buttons)) {
+ if (js.axis[axis] < corda[axis].cmin[pos]) {
+ corda[axis].cmin[pos] = js.axis[axis];
+ t = get_time();
+ }
+ if (js.axis[axis] > corda[axis].cmax[pos]) {
+ corda[axis].cmax[pos] = js.axis[axis];
+ t = get_time();
+ }
+ wait_for_event(fd, &js);
+ }
+ puts("OK.");
}
- puts("OK.");
- }
puts("");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|