From 27a7d8cb204045ae77e875435ab4773446dc8fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 17 Aug 2010 09:25:15 +0000 Subject: a simple README svn path=/trunk/externals/hardware/wiimote/; revision=13815 --- README | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..fe32795 --- /dev/null +++ b/README @@ -0,0 +1,44 @@ +wiimote for Pd +============== + +[wiimote] is a Pd-object that allows to read data from a Wii Remote Controller +it depends on libcwiid, which is currently only available on linux + + +random notes +============ + +extensions +---------- +the external is known to support the nunchuck, classic, motionplus extensions +the balance extension might work, but is currently untested (if it doesn't work +and you need it, contact me to and send me the hardware) + +motionplus +---------- +the motionplus extension for the wiimote is supported (out of the box, see +above). +however, older releases of libcwiid are inaccurate at detecting rotation speed +(the wii remote reports whether the controller is turned fast or slow; this info +is missing in libcwiid). +if you have such a version of libcwiid and need higher precision, you have to +patch the sources of libcwiid: +$ cd /path/to/cwiid/libcwiid +$ patch < /path/to/wiimote/patches/cwiid201_motionplus_sensitivity.patch +$ cd /path/to/cwiid/ +$ make (read README to see how to patch libcwiid) + +once you have done that, you need to make the external aware of the new feature. +for this create a file +/path/to/wiimote/Make.local +and add the following line: +CFLAGS += -DHAVE_CWIID_MOTIONPLUS_LOWSPEED + +then recompile wiimote + + +contact +======= +get in contact with me either via the pd-list +(http://lists.puredata.info/listinfo/pd-list) or directly via +zmoelnig[at]iem[.]at -- cgit v1.2.1 From 82c35764532dad5243e432bcaa549ab25b41c998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 17 Aug 2010 09:28:23 +0000 Subject: a dummy version file svn path=/trunk/externals/hardware/wiimote/; revision=13816 --- VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..ae65228 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +see startup messages for current version of wiimote -- cgit v1.2.1 From 35d35742c9dcca0eecf04103d31c4adbb1ff0ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 17 Aug 2010 09:30:54 +0000 Subject: changes files and readme mentioning multiple dongles svn path=/trunk/externals/hardware/wiimote/; revision=13817 --- CHANGES | 1 + README | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 CHANGES diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..cc123bf --- /dev/null +++ b/CHANGES @@ -0,0 +1 @@ +initial release 0.3 diff --git a/README b/README index fe32795..bc28f88 100644 --- a/README +++ b/README @@ -36,6 +36,10 @@ CFLAGS += -DHAVE_CWIID_MOTIONPLUS_LOWSPEED then recompile wiimote +multiple bluetooth dongles +-------------------------- +[LATER describe that] + contact ======= -- cgit v1.2.1 From a716404895da793c5bfb88f43d2534cb7def27e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 17 Aug 2010 09:34:57 +0000 Subject: meta file and don't include all pd patches when installing svn path=/trunk/externals/hardware/wiimote/; revision=13818 --- Makefile | 4 ++-- wiimote-meta.pd | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 wiimote-meta.pd diff --git a/Makefile b/Makefile index 2b04372..c01c976 100644 --- a/Makefile +++ b/Makefile @@ -102,8 +102,8 @@ single_install: $(LIBRARY_NAME) install-doc install-exec install-doc: install -d $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) -# install -m644 -p $(SOURCES:.c=-help.pd) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) - install -m644 -p $(wildcard *.pd) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + install -m644 -p $(SOURCES:.c=-help.pd) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) +# install -m644 -p $(wildcard *.pd) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) install -m644 -p README $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt install -m644 -p VERSION $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/VERSION.txt install -m644 -p CHANGES $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/CHANGES.txt diff --git a/wiimote-meta.pd b/wiimote-meta.pd new file mode 100644 index 0000000..24872d2 --- /dev/null +++ b/wiimote-meta.pd @@ -0,0 +1,6 @@ +#N canvas 15 49 200 200 10; +#N canvas 25 49 420 300 META 1; +#X text 13 41 NAME wiimote; +#X text 10 25 AUTHOR Mike Wozniewski + Florian Krebs + IOhannes m zmoelnig; +#X text 10 10 VERSION 0.3; +#X restore 10 10 pd META; -- cgit v1.2.1 From 84af4cd4d9df44b51ca4c7999bea4afcb0ea1051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 17 Aug 2010 09:45:55 +0000 Subject: automatic version updates svn path=/trunk/externals/hardware/wiimote/; revision=13819 --- Makefile | 4 +++- VERSION | 2 +- version_update.sh | 11 +++++++++++ wiimote-help.pd | 4 +++- wiimote-meta.pd | 10 ++++++---- wiimote.c | 6 +++++- 6 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 version_update.sh diff --git a/Makefile b/Makefile index c01c976..acd55f5 100644 --- a/Makefile +++ b/Makefile @@ -18,12 +18,14 @@ SOURCES_Windows = # #------------------------------------------------------------------------------# +VERSION=0.3.1 + # where Pd lives PD_PATH = ../../pd # where to install the library objectsdir = $(PD_PATH)/extra -CFLAGS = -DPD -I$(PD_PATH)/src -Wall -W -g +CFLAGS = -DPD -I$(PD_PATH)/src -Wall -W -g -DVERSION=\"$(VERSION)\" LDFLAGS = LIBS = -lcwiid -lbluetooth -lpthread diff --git a/VERSION b/VERSION index ae65228..9e11b32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -see startup messages for current version of wiimote +0.3.1 diff --git a/version_update.sh b/version_update.sh new file mode 100644 index 0000000..0425b55 --- /dev/null +++ b/version_update.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +VERSION=$(cat VERSION) + +echo updating to version: $VERSION + +sed -e "s|^VERSION=.*$|VERSION=${VERSION}|" -i Makefile +sed -e "s| VERSION .*;$| VERSION ${VERSION};|" -i wiimote-meta.pd + + + diff --git a/wiimote-help.pd b/wiimote-help.pd index 71ac3ec..0993f28 100644 --- a/wiimote-help.pd +++ b/wiimote-help.pd @@ -2,7 +2,7 @@ #N struct NC-stick float x float y; #N struct cc-left-stick float x float y; #N struct cc-right-stick float x float y; -#N canvas 133 45 830 538 10; +#N canvas 432 145 830 538 10; #X text 8 9 IN ORDER TO CONNECT: First put the wiimote into discover mode (press buttons 1 and 2 simultaneously).; #X text 16 364 You can also specify the address as a creation argument: @@ -642,6 +642,8 @@ empty -2 -8 0 10 -203904 -1 -1 0 1; #X connect 1 0 3 0; #X connect 3 0 2 0; #X restore 667 502 pd Balance; +#X text 18 472 (c) 2007-2010 Mike Wozniewski \, IOhannes m zmoelnig +& Roman Haefeli; #X connect 20 0 19 0; #X connect 21 0 19 0; #X connect 22 0 19 0; diff --git a/wiimote-meta.pd b/wiimote-meta.pd index 24872d2..0d919c4 100644 --- a/wiimote-meta.pd +++ b/wiimote-meta.pd @@ -1,6 +1,8 @@ -#N canvas 15 49 200 200 10; -#N canvas 25 49 420 300 META 1; +#N canvas 16 114 200 200 10; +#N canvas 488 184 420 300 META 1; #X text 13 41 NAME wiimote; -#X text 10 25 AUTHOR Mike Wozniewski + Florian Krebs + IOhannes m zmoelnig; -#X text 10 10 VERSION 0.3; +#X text 10 25 AUTHOR Mike Wozniewski + Florian Krebs + IOhannes m zmoelnig +; +#X text 10 10 VERSION 0.3.1; +#X obj 163 144 wiimote; #X restore 10 10 pd META; diff --git a/wiimote.c b/wiimote.c index e6391a1..79bddf2 100644 --- a/wiimote.c +++ b/wiimote.c @@ -1144,5 +1144,9 @@ void wiimote_setup(void) post(" (c) 2007 Mike Wozniewski"); post(" (c) 2008-2009 Florian Krebs"); post(" (c) 2009-2010 IOhannes m zmoelnig"); - post(" version 0.3 published under the GNU General Public License"); +#ifdef VERSION + post(" version " VERSION " published under the GNU General Public License"); +#else + post(" published under the GNU General Public License"); +#endif } -- cgit v1.2.1 From 297b2d6f3dd9e0e6e9a587b0379f407b71ac8740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 17 Aug 2010 09:54:56 +0000 Subject: go away svn path=/trunk/externals/hardware/wiimote/; revision=13820 --- makefile.org | 64 ------------------------------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 makefile.org diff --git a/makefile.org b/makefile.org deleted file mode 100644 index b9cda41..0000000 --- a/makefile.org +++ /dev/null @@ -1,64 +0,0 @@ -NAME=wiimote - -# If you want to use a customized Pd, then define a $PD_PATH variable. -# Otherwise, the Pd must be installed on the system -PD_PATH=../../../pd - -# specify the path to CWiid: -#CWIID_PATH = $(ASCAPE_PATH)/usr/lib -LIBCWIID_PATH = "cwiid-svn/libcwiid" - -###################################################### -# You shouldn't need to change anything beyond here! # -###################################################### - - -ifdef PD_PATH -PD_INCLUDE := -I$(PD_PATH)/src -PD_EXTRA_PATH := ../../../../lib/libs -PD_DOC_PATH := ../../../../lib/pd-help -else -PD_INCLUDE := -I../../../pd/src -PD_EXTRA_PATH := /usr/local/lib/pd/extra -PD_DOC_PATH := /usr/local/lib/pd/doc -endif - - -#LIBS = $(LIBCWIID_PATH)/libcwiid.a -lbluetooth -lpthread -LIBS = -lcwiid -lbluetooth -lpthread - -current: pd_linux - -##### LINUX: - -pd_linux: $(NAME).pd_linux - -.SUFFIXES: .pd_linux - -LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ - -W -Wshadow -Wstrict-prototypes \ - -Wno-unused -Wno-parentheses -Wno-switch - -.c.pd_linux: - $(CC) $(LINUXCFLAGS) $(PD_INCLUDE) -o $*.o -c $*.c - $(LD) --export-dynamic -shared -o $*.pd_linux $*.o $(LIBS) -lc -lm - strip --strip-unneeded $*.pd_linux - rm -f $*.o - -install: - -ifdef ASCAPE_INSTALLED - -cp *help*.pd $(ASCAPE_PATH)/ss_engine/pd/help/. -ifeq ($(findstring Linux,$(ASCAPE_OS)),Linux) - -cp *.pd_linux $(ASCAPE_PATH)/ss_engine/pd/externs/$(ASCAPE_OS)$(ASCAPE_ARCH)/. -endif -ifeq ($(findstring Darwin,$(SS_OS)),Darwin) - -cp *.pd_darwin $(ASCAPE_PATH)/ss_engine/pd/externs/$(ASCAPE_OS)$(ASCAPE_ARCH)/. -endif -endif - - -cp *.pd_linux $(PD_EXTRA_PATH)/. - -cp *help*.pd $(PD_DOC_PATH)/. - -clean: - -rm -f *.o *.pd_* so_locations -- cgit v1.2.1