Permalink
Browse files

Initial import

git-svn-id: http://abstrakraft.org/cwiid/svn/CWiid/trunk@3 918edb2d-ff29-0410-9de2-eb38e7f22bc7
  • Loading branch information...
1 parent bbc7fbb commit 15d141cccd9a38fede6b80ab2d6b8f921991cf25 @abstrakraft committed with dsmith Feb 21, 2007
Showing with 22,197 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +340 −0 COPYING
  3. +114 −0 ChangeLog
  4. +37 −0 Makefile.in
  5. +68 −0 README
  6. +170 −0 aclocal.m4
  7. +29 −0 common/include/app.mak
  8. +18 −0 common/include/defs.mak.in
  9. +5 −0 common/include/dep.mak
  10. +54 −0 common/include/lib.mak
  11. +31 −0 common/include/plugin.mak
  12. +5,533 −0 configure
  13. +54 −0 configure.ac
  14. +6 −0 doc/Xmodmap
  15. +54 −0 doc/wminput
  16. +32 −0 wiimote/Makefile.in
  17. +195 −0 wiimote/command.c
  18. +214 −0 wiimote/connect.c
  19. +608 −0 wiimote/event.c
  20. +182 −0 wiimote/queue.c
  21. +27 −0 wiimote/queue.h
  22. +245 −0 wiimote/rw.c
  23. +174 −0 wiimote/util.c
  24. +208 −0 wiimote/wiimote.h
  25. +169 −0 wiimote/wiimote_internal.h
  26. +20 −0 wmdemo/Makefile.in
  27. +224 −0 wmdemo/main.c
  28. +20 −0 wmgui/Makefile.in
  29. +98 −0 wmgui/callbacks.c
  30. +46 −0 wmgui/callbacks.h
  31. +1,827 −0 wmgui/interface.c
  32. +6 −0 wmgui/interface.h
  33. +1,232 −0 wmgui/main.c
  34. +144 −0 wmgui/support.c
  35. +44 −0 wmgui/support.h
  36. +3,348 −0 wmgui/wmgui.glade
  37. +3,348 −0 wmgui/wmgui.glade.bak
  38. +15 −0 wmgui/wmgui.gladep
  39. +15 −0 wmgui/wmgui.gladep.bak
  40. +56 −0 wminput/Makefile.in
  41. +86 −0 wminput/README
  42. +19 −0 wminput/action_enum.awk
  43. +467 −0 wminput/action_enum.txt
  44. +490 −0 wminput/conf.c
  45. +169 −0 wminput/conf.h
  46. +7 −0 wminput/configs/acc_ptr
  47. +33 −0 wminput/configs/buttons
  48. +19 −0 wminput/configs/gamepad
  49. +7 −0 wminput/configs/ir_ptr
  50. +4 −0 wminput/configs/neverball
  51. +7 −0 wminput/configs/nunchuk_acc_ptr
  52. +188 −0 wminput/lexer.l
  53. +547 −0 wminput/main.c
  54. +102 −0 wminput/parser.y
  55. +28 −0 wminput/plugins/Makefile.in
  56. +17 −0 wminput/plugins/acc/Makefile.in
  57. +166 −0 wminput/plugins/acc/acc.c
  58. +16 −0 wminput/plugins/ir_ptr/Makefile.in
  59. +216 −0 wminput/plugins/ir_ptr/ir_ptr.c
  60. +17 −0 wminput/plugins/nunchuk_acc/Makefile.in
  61. +174 −0 wminput/plugins/nunchuk_acc/nunchuk_acc.c
  62. +276 −0 wminput/uinput.c
  63. +42 −0 wminput/util.c
  64. +23 −0 wminput/util.h
  65. +66 −0 wminput/wmplugin.h
View
@@ -0,0 +1 @@
+L. Donnie Smith <wiimote@abstrakraft.org>
View
340 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
View
114 ChangeLog
@@ -0,0 +1,114 @@
+ver 0.5.00
+ wiimote:
+ fixed wiimote_status_mesg allocation size
+ changed wiimote_log to wiimote_err with format string and args
+ reworked event/callback system to pass arrays of (simultaneous) messages
+ added extern "C" declaration to wiimote.h for c++ programs
+ added wiimote_t * to wiimote_mesg_t callback prototype (to facilitate
+ using the same callback for multiple wiimotes)
+ wmdemo:
+ added
+ wmgui:
+ Added parent argument to message function
+ wminput:
+ rewrite: new configuration syntax, plugin architecture
+
+ver 0.4.01
+ wiimote:
+ added rpt_mode_flag lock to prevent race condition
+ extended write sequences to simplify multi-part operations
+ wmgui:
+ added status request at connect to populate status boxes
+
+ver 0.4.00
+ Added uninstall make target
+ wiimote:
+ macros renamed (should be last rename of public macros)
+ added status, nunchuk, and classic controller messages
+ added intelligent report mode selection
+ wmgui:
+ changed button widgets
+ added nunchuk and classic controller support
+ wminput:
+ fixed command-line bug
+ updated for wiimote updates
+ changes to plugin architecture - gives greater access to plugin
+ added LED indicators to default (IR) tracking
+
+ver 0.3.51
+ wminput:
+ fixed build error in plugins directory
+
+ver 0.3.50
+ reworked build system, now using autoconf
+ wiimote:
+ fixed bug in IR report data extraction
+ created acc_ir client message
+ make install now installs library and header to /usr/local
+ wmif:
+ removed
+ wmgui:
+ reworked GUI
+ added force, roll and pitch displays
+ removed AutoMake
+ split wiimote_callback into separate functions
+ rewrote command-line parsing
+ added WIIMOTE_BDADDR environment variable lookup
+ wminput:
+ split wiimote_callback into separate functions
+ cleaned up cursor tracking
+ renamed wminput.c to main.c
+ rewrote command-line parsing
+ added WIIMOTE_BDADDR environment variable lookup
+ created plugin architecture and acc plugin
+
+ver 0.3.01
+ reworked top-level Makefile
+ bins install to /usr/local/bin on make install
+ wiimote:
+ Changes to message dispatch thread to isolate main thread from dispatch timing issues (especially GTK apps)
+ wmif:
+ fixed --help bug
+ wmgui:
+ fixed --help bug
+ added g_thread_support test before g_thread_init
+ wminput:
+ fixed --help bug
+ added #ifdef tests around KEY_ macros in key_enum.{c,awk}
+
+ver 0.3.00
+ wiimote:
+ put mesg callback data in a union
+ fixed write flood error (wait for ACK after each packet)
+ added IR reporting (mode 0x33 only)
+ moved internal definitions from wiimote.h into wiimote_internal.h (struct wiimote is now opaque)
+ wiimote_connect now returns a wiimote_t *
+ sends button message only when button status changes
+ wmif:
+ updated for wiimote changes
+ wmgui:
+ updated for wiimote changes
+ enabled IR widgets
+ wminput:
+ added to package
+
+ver 0.2.00 12/31/2006
+ wiimote:
+ changed various macro names and parameter types (mostly signed to unsigned)
+ cleaned up LED & RUMBLE command logic
+ added ACC reporting
+ added data read/write
+ created dispatch thread (isolates bluetooth read from app callbacks)
+ reset report mode after receive status report
+ wmif:
+ updated for wiimote changes
+ added EEPROM read menu option
+ wmgui:
+ updated for wiimote changes
+ added ACC output
+ added data read/write
+ added IR data widgets (not yet enabled)
+
+ver 0.1.00 12/28/2006
+ Initial release
+
View
@@ -0,0 +1,37 @@
+#Copyright (C) 2007 L. Donnie Smith
+
+COMMON = @top_builddir@/common
+include $(COMMON)/include/defs.mak
+
+LIB_DIRS = wiimote
+BIN_DIRS = wmgui wminput
+
+all install clean distclean uninstall: TARGET += $(MAKECMDGOALS)
+
+all install clean distclean uninstall: $(BIN_DIRS) $(LIB_DIRS)
+
+all clean distclean: wmdemo
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(MAKECMDGOALS),distclean)
+$(BIN_DIRS): $(LIB_DIRS)
+endif
+endif
+
+ifeq ($(MAKECMDGOALS),install)
+$(BIN_DIRS) $(LIB_DIRS): $(GLOBAL_CWIID_DIR)
+endif
+
+$(LIB_DIRS) $(BIN_DIRS) wmdemo:
+ $(MAKE) $(TARGET) -C $@
+
+$(GLOBAL_CWIID_DIR):
+ mkdir -p $(GLOBAL_CWIID_DIR)
+
+distclean:
+ rm -rf Makefile config.log config.status autom4te.cache $(COMMON)/include/defs.mak
+
+uninstall:
+ rm -rf $(GLOBAL_CWIID_DIR); true
+
+.PHONY: all install clean distclean uninstall $(LIB_DIRS) $(BIN_DIRS) wmdemo
View
68 README
@@ -0,0 +1,68 @@
+Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
+
+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
+
+
+------------------------------------------------------------------------------------------------
+CWiid Wiimote Interface
+------------------------------------------------------------------------------------------------
+
+DESCRIPTION
+------------------------------------------------------------------------------------------------
+The CWiid package contains the following parts:
+1.wiimote library - API to the wiimote.
+2.wmgui - GTK gui to the wiimote.
+3.wminput - an event/joystick/mouse driver for the wiimote.
+4.wmdemo - a minimal demonstration of the libwiimote API. (not installed)
+
+REQUIREMENTS
+------------------------------------------------------------------------------------------------
+autoconf, awk, bison, flex, bluez-libs, gtk+-2 dev libs, uinput kernel support, kernel sources
+
+INSTALLATION
+------------------------------------------------------------------------------------------------
+./configure
+make
+sudo make install
+
+Many distributions do not have /usr/local/lib in the library search path, and on many of these same distributions, the library installation directory (as determined by autoconf) is /usr/local/lib, creating a problem when you try to run programs depending on libraries installed there. There are two clean ways to fix this:
+1.Add a --prefix=/usr argument to ./configure
+2.Add /usr/local/lib to /etc/ld.so.conf, then run ldconfig.
+
+I prefer the second method since it keeps local software in the local directory where it should be, and it fixes the problem for every package using /usr/local/lib, not just CWiid. Until someone offers a convincing argument for the omission of /usr/local/lib from /etc/ld.so.conf, I consider this to be a distribution bug, and method #2 above is the fix.
+
+Previous versions of CWiid installed plugins and configuration files in /usr/local/lib/CWiid. This directory is no longer used and may be deleted.
+
+Please report any compilation errors to <wiimote@abstrakraft.org>.
+
+EXECUTION
+------------------------------------------------------------------------------------------------
+wmgui [-h] [bdaddr]
+wminput [-h] [-c config] [bdaddr]
+
+The bluetooth device address (bdaddr) of the wiimote can be specified on the command-line, or through the WIIMOTE_BDADDR environment variable, in that order of precedence. If neither is given, the first wiimote found by hci_inquiry will be used.
+See wminput/README for more information on wminput configuration and execution.
+
+TODO/ROADMAP
+------------------------------------------------------------------------------------------------
+The following list is neither complete nor ordered:
+lswm (list wiimotes)
+wmcp (copy data between files and wiimotes)
+Move wiimote communications into a separate daemon (wiimoted) with which applications communicate via sockets (or some other means)
+wmgui logging
+Implement speaker
+gui/control interface to wminput
+Implement other drivers such as gesture recognition.
+
View
@@ -0,0 +1,170 @@
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [$4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
Oops, something went wrong.

0 comments on commit 15d141c

Please sign in to comment.