aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-05-17 05:15:02 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:08:25 +0200
commit6429a44f369c05270faa22fa17be45e3ea05aa96 (patch)
treede171783d3acef2a5dbf32b63b333411fe688280
parentbc84a83351307d08588b086634b159c186cede81 (diff)
cleaned up some things in prep for importing new code
svn path=/trunk/externals/io/; revision=7686
-rw-r--r--wiiremote/aka.wiiremote_b2_pd-port.patch223
-rw-r--r--wiiremote/aka.wiiremote_b3_pd-port.patch176
-rw-r--r--wiiremote/aka.wiiremote_b4_pd-port.patch186
-rw-r--r--wiiremote/wiiremote-help.pd38
4 files changed, 23 insertions, 600 deletions
diff --git a/wiiremote/aka.wiiremote_b2_pd-port.patch b/wiiremote/aka.wiiremote_b2_pd-port.patch
deleted file mode 100644
index 3f96112..0000000
--- a/wiiremote/aka.wiiremote_b2_pd-port.patch
+++ /dev/null
@@ -1,223 +0,0 @@
---- /Users/hans/Desktop/aka.wiiremote-b2-src/aka.wiiremote.c 2006-12-15 08:36:06.000000000 -0500
-+++ aka.wiiremote.c 2006-12-16 17:05:31.000000000 -0500
-@@ -1,15 +1,28 @@
- // aka.wiiremote.c
- // Copyright by Masayuki Akamatsu
-+// port to Pd by Hans-Christoph Steiner <hans@at.or.at>
-
-+
-+#ifdef PD
-+#include "m_pd.h"
-+#define SETLONG SETFLOAT
-+static t_class *wiiremote_class;
-+#else /* Max */
- #include "ext.h"
-+#endif
- #include "wiiremote.h"
-
- #define kInterval 100
- #define kMaxTrial 100
-
-+
- typedef struct _akawiiremote
- {
-+#ifdef PD
-+ t_object x_obj;
-+#else /* Max */
- struct object obj;
-+#endif
-
- WiiRemoteRef wiiremote;
-
-@@ -44,6 +57,36 @@
- void *akawiiremote_new(t_symbol *s, short ac, t_atom *av);
- void akawiiremote_free(t_akawiiremote *x);
-
-+#ifdef PD
-+void wiiremote_setup()
-+{
-+ wiiremote_class = class_new(gensym("wiiremote"),
-+ (t_newmethod)akawiiremote_new,
-+ (t_method)akawiiremote_free,
-+ sizeof(t_akawiiremote),
-+ CLASS_DEFAULT,
-+ A_GIMME,0);
-+
-+ class_addbang(wiiremote_class,(t_method)akawiiremote_bang);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_connect,gensym("connect"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_disconnect,gensym("disconnect"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_motionsensor,gensym("motionsensor"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_irsensor,gensym("irsensor"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_vibration,gensym("vibration"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_led,gensym("led"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
-+
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getbatterylevel,gensym("getbatterylevel"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getexpansionstatus,gensym("getexpansionstatus"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getledstatus,gensym("getledstatus"),0);
-+
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_assist,gensym("assist"),A_CANT,0);
-+
-+ post("aka.wiiremote 1.0B2-UB by Masayuki Akamatsu");
-+ post("\tPd port by Hans-Christoph Steiner");
-+
-+ akawiiremote_count = 0;
-+}
-+#else /* Max */
- void main()
- {
- setup((t_messlist **)&akawiiremote_class, (method)akawiiremote_new, (method)akawiiremote_free, (short)sizeof(t_akawiiremote), 0L, A_GIMME, 0);
-@@ -66,7 +109,7 @@
-
- akawiiremote_count = 0;
- }
--
-+#endif /* PD */
- //--------------------------------------------------------------------------------------------
-
- void akawiiremote_bang(t_akawiiremote *x)
-@@ -76,6 +119,27 @@
- if (x->wiiremote->device == nil)
- return; // do nothing
-
-+#ifdef PD
-+ outlet_float(x->buttonsOut, (t_float) x->wiiremote->buttonData);
-+
-+ if (x->wiiremote->isIRSensorEnabled)
-+ {
-+ SETFLOAT(list, x->wiiremote->posX);
-+ SETFLOAT(list + 1, x->wiiremote->posY);
-+ SETFLOAT(list + 2, x->wiiremote->angle);
-+ SETFLOAT (list + 3, x->wiiremote->tracking);
-+ outlet_list(x->irOut, &s_list, 4, list);
-+ }
-+
-+ if (x->wiiremote->isMotionSensorEnabled)
-+ {
-+ SETFLOAT(list, x->wiiremote->accX);
-+ SETFLOAT(list + 1, x->wiiremote->accY);
-+ SETFLOAT(list + 2, x->wiiremote->accZ);
-+ SETFLOAT(list + 3, x->wiiremote->orientation);
-+ outlet_list(x->accOut, &s_list, 4, list);
-+ }
-+#else /* Max */
- outlet_int(x->buttonsOut, x->wiiremote->buttonData);
-
- if (x->wiiremote->isIRSensorEnabled)
-@@ -95,6 +159,7 @@
- SETLONG(list + 3, x->wiiremote->orientation);
- outlet_list(x->accOut, 0L, 4, &list);
- }
-+#endif /* PD */
-
- wiiremote_getstatus();
- }
-@@ -173,11 +238,19 @@
- {
- t_atom list[4];
-
-+#ifdef PD
-+ SETFLOAT(list, x->wiiremote->isLED1Illuminated);
-+ SETFLOAT(list + 1, x->wiiremote->isLED2Illuminated);
-+ SETFLOAT(list + 2, x->wiiremote->isLED3Illuminated);
-+ SETFLOAT(list + 3, x->wiiremote->isLED4Illuminated);
-+ outlet_anything(x->statusOut, gensym("ledstatus"), 4, list);
-+#else /* Max */
- SETLONG(list, x->wiiremote->isLED1Illuminated);
- SETLONG(list + 1, x->wiiremote->isLED2Illuminated);
- SETLONG(list + 2, x->wiiremote->isLED3Illuminated);
- SETLONG(list + 3, x->wiiremote->isLED4Illuminated);
- outlet_anything(x->statusOut, gensym("ledstatus"), 4, &list);
-+#endif
- }
-
- //--------------------------------------------------------------------------------------------
-@@ -222,11 +295,13 @@
-
- void akawiiremote_assist(t_akawiiremote *x, void *b, long m, long a, char *s)
- {
-+#ifndef PD /* Max */
- if (m==ASSIST_INLET)
- {
- sprintf(s,"connect, bang, disconnect....");
- }
- else
-+#endif /* NOT PD */
- {
- switch(a)
- {
-@@ -242,6 +317,17 @@
-
- void *akawiiremote_new(t_symbol *s, short ac, t_atom *av)
- {
-+#ifdef PD
-+ t_akawiiremote *x = (t_akawiiremote *)pd_new(wiiremote_class);
-+
-+ x->clock = clock_new(x, (t_method)akawiiremote_clock);
-+
-+ /* create anything outlet used for HID data */
-+ x->statusOut = outlet_new(&x->x_obj, 0);
-+ x->buttonsOut = outlet_new(&x->x_obj, &s_float);
-+ x->irOut = outlet_new(&x->x_obj, &s_list);
-+ x->accOut = outlet_new(&x->x_obj, &s_list);
-+#else /* Max */
- t_akawiiremote *x;
-
- x = (t_akawiiremote *)newobject(akawiiremote_class);
-@@ -249,13 +335,15 @@
- x->wiiremote = wiiremote_init();
-
- x->clock = clock_new(x, (method)akawiiremote_clock);
-- x->trial = 0;
-- x->interval = kInterval;
-
- x->statusOut = outlet_new(x, 0);
- x->buttonsOut = intout(x);
- x->irOut = listout(x);
- x->accOut = listout(x);
-+#endif /* PD */
-+ x->trial = 0;
-+ x->interval = kInterval;
-+
-
- akawiiremote_count++;
- return x;
-@@ -267,6 +355,12 @@
- if (akawiiremote_count == 0)
- wiiremote_disconnect();
-
-+#ifdef PD
-+ if (x->clock)
-+ clock_unset(x->clock);
-+ clock_free(x->clock);
-+#else /* Max */
- freeobject(x->clock);
-+#endif
- }
-
---- /Users/hans/Desktop/aka.wiiremote-b2-src/wiiremote.h 2006-12-14 10:21:42.000000000 -0500
-+++ wiiremote.h 2006-12-16 16:48:38.000000000 -0500
-@@ -2,9 +2,13 @@
- // Copyright by Masayuki Akamatsu
- // Based on "DarwiinRemote" by Hiroaki Kimura
-
-+#include <CoreFoundation/CoreFoundation.h>
- #include <IOBluetooth/Bluetooth.h>
- #include <IOBluetooth/IOBluetoothUserLib.h>
-
-+#include <stdio.h>
-+#include <string.h>
-+
- typedef struct {
- int x, y, s;
- } IRData;
---- /Users/hans/Desktop/aka.wiiremote-b2-src/wiiremote.c 2006-12-15 08:31:05.000000000 -0500
-+++ wiiremote.c 2006-12-16 17:12:14.000000000 -0500
-@@ -4,6 +4,8 @@
-
- #include "wiiremote.h"
-
-+#include <unistd.h>
-+
- // this type is used a lot (data array):
- typedef unsigned char darr[];
-
diff --git a/wiiremote/aka.wiiremote_b3_pd-port.patch b/wiiremote/aka.wiiremote_b3_pd-port.patch
deleted file mode 100644
index 8609c62..0000000
--- a/wiiremote/aka.wiiremote_b3_pd-port.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- /Users/hans/Documents/Research/HID/wiiremote/aka.wiiremote-b3-src/wiiremote.h 2006-12-20 05:29:31.000000000 -0500
-+++ wiiremote.h 2006-12-28 01:36:00.000000000 -0500
-@@ -2,8 +2,13 @@
- // Copyright by Masayuki Akamatsu
- // Based on "DarwiinRemote" by Hiroaki Kimura
-
-+#include <CoreFoundation/CoreFoundation.h>
-+#include <IOBluetooth/Bluetooth.h>
- #include <IOBluetooth/IOBluetoothUserLib.h>
-
-+#include <stdio.h>
-+#include <string.h>
-+
- typedef struct {
- int x, y, s;
- } IRData;
---- /Users/hans/Documents/Research/HID/wiiremote/aka.wiiremote-b3-src/aka.wiiremote.c 2006-12-20 06:09:10.000000000 -0500
-+++ aka.wiiremote.c 2006-12-28 17:47:08.000000000 -0500
-@@ -4,15 +4,28 @@
- // 1.0B2 : 2006.12.15
- // 1.0B3 : 2006.12.20
-
-+#ifdef PD
-+#include "m_pd.h"
-+#define SETLONG SETFLOAT
-+static t_class *wiiremote_class;
-+#else /* Max */
- #include "ext.h"
-+#endif /* PD */
-+
- #include "wiiremote.h"
-
-+#include <stdio.h>
-+
- #define kInterval 100
- #define kMaxTrial 100
-
- typedef struct _akawiiremote
- {
-+#ifdef PD
-+ t_object x_obj;
-+#else /* Max */
- struct object obj;
-+#endif
-
- WiiRemoteRef wiiremote;
-
-@@ -47,7 +60,11 @@
- void *akawiiremote_new(t_symbol *s, short ac, t_atom *av);
- void akawiiremote_free(t_akawiiremote *x);
-
-+#ifdef PD
-+void wiiremote_setup()
-+#else /* Max */
- void main()
-+#endif /* PD */
- {
- NumVersion outSoftwareVersion;
- BluetoothHCIVersionInfo outHardwareVersion;
-@@ -66,6 +83,32 @@
- return;
- }
-
-+ post("aka.wiiremote 1.0B3-UB by Masayuki Akamatsu");
-+
-+#ifdef PD
-+ post("\tPd port by Hans-Christoph Steiner");
-+
-+ wiiremote_class = class_new(gensym("wiiremote"),
-+ (t_newmethod)akawiiremote_new,
-+ (t_method)akawiiremote_free,
-+ sizeof(t_akawiiremote),
-+ CLASS_DEFAULT,
-+ A_GIMME,0);
-+
-+ class_addbang(wiiremote_class,(t_method)akawiiremote_bang);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_connect,gensym("connect"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_disconnect,gensym("disconnect"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_motionsensor,gensym("motionsensor"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_irsensor,gensym("irsensor"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_vibration,gensym("vibration"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_led,gensym("led"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
-+
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getbatterylevel,gensym("getbatterylevel"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getexpansionstatus,gensym("getexpansionstatus"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getledstatus,gensym("getledstatus"),0);
-+
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_assist,gensym("assist"),A_CANT,0);
-+#else /* Max */
- setup((t_messlist **)&akawiiremote_class, (method)akawiiremote_new, (method)akawiiremote_free, (short)sizeof(t_akawiiremote), 0L, A_GIMME, 0);
-
- addbang((method)akawiiremote_bang);
-@@ -81,8 +124,7 @@
- addmess((method)akawiiremote_getledstatus,"getledstatus",0);
-
- addmess((method)akawiiremote_assist,"assist",A_CANT,0);
--
-- post("aka.wiiremote 1.0B3-UB by Masayuki Akamatsu");
-+#endif /* PD */
-
- akawiiremote_count = 0;
- }
-@@ -96,7 +138,11 @@
- if (x->wiiremote->device == nil)
- return; // do nothing
-
-+#ifdef PD
-+ outlet_float(x->buttonsOut, (t_float) x->wiiremote->buttonData);
-+#else /* Max */
- outlet_int(x->buttonsOut, x->wiiremote->buttonData);
-+#endif /* PD */
-
- if (x->wiiremote->isIRSensorEnabled)
- {
-@@ -244,11 +290,13 @@
-
- void akawiiremote_assist(t_akawiiremote *x, void *b, long m, long a, char *s)
- {
-+#ifndef PD /* Max */
- if (m==ASSIST_INLET)
- {
- sprintf(s,"connect, bang, disconnect....");
- }
- else
-+#endif /* NOT PD */
- {
- switch(a)
- {
-@@ -264,6 +312,19 @@
-
- void *akawiiremote_new(t_symbol *s, short ac, t_atom *av)
- {
-+#ifdef PD
-+ t_akawiiremote *x = (t_akawiiremote *)pd_new(wiiremote_class);
-+
-+ x->wiiremote = wiiremote_init();
-+
-+ x->clock = clock_new(x, (t_method)akawiiremote_clock);
-+
-+ /* create anything outlet used for HID data */
-+ x->statusOut = outlet_new(&x->x_obj, 0);
-+ x->buttonsOut = outlet_new(&x->x_obj, &s_float);
-+ x->irOut = outlet_new(&x->x_obj, &s_list);
-+ x->accOut = outlet_new(&x->x_obj, &s_list);
-+#else /* Max */
- t_akawiiremote *x;
-
- x = (t_akawiiremote *)newobject(akawiiremote_class);
-@@ -271,13 +332,14 @@
- x->wiiremote = wiiremote_init();
-
- x->clock = clock_new(x, (method)akawiiremote_clock);
-- x->trial = 0;
-- x->interval = kInterval;
-
- x->statusOut = outlet_new(x, 0);
- x->buttonsOut = intout(x);
- x->irOut = listout(x);
- x->accOut = listout(x);
-+#endif /* PD */
-+ x->trial = 0;
-+ x->interval = kInterval;
-
- akawiiremote_count++;
- return x;
-@@ -290,6 +352,10 @@
- wiiremote_disconnect();
-
- clock_unset(x->clock);
-+#ifdef PD
-+ clock_free(x->clock);
-+#else /* Max */
- freeobject((t_object *)x->clock);
-+#endif /* PD */
- }
-
diff --git a/wiiremote/aka.wiiremote_b4_pd-port.patch b/wiiremote/aka.wiiremote_b4_pd-port.patch
deleted file mode 100644
index 0edf592..0000000
--- a/wiiremote/aka.wiiremote_b4_pd-port.patch
+++ /dev/null
@@ -1,186 +0,0 @@
---- /Users/hans/Documents/Research/HID/wiiremote/aka.wiiremote-b4-src/wiiremote.c 2006-12-23 09:52:07.000000000 -0500
-+++ wiiremote.c 2006-12-28 18:11:52.000000000 -0500
-@@ -444,7 +444,7 @@
- Boolean writeData(WiiRemoteRef wiiremote, const unsigned char *data, unsigned long address, size_t length)
- {
- unsigned char cmd[22];
-- int i;
-+ unsigned int i;
-
- for(i=0 ; i<length ; i++) cmd[i+6] = data[i];
-
---- /Users/hans/Documents/Research/HID/wiiremote/aka.wiiremote-b4-src/wiiremote.h 2006-12-22 10:39:45.000000000 -0500
-+++ wiiremote.h 2006-12-28 18:10:04.000000000 -0500
-@@ -2,7 +2,11 @@
- // Copyright by Masayuki Akamatsu
- // Based on "DarwiinRemote" by Hiroaki Kimura
-
-+#include <CoreFoundation/CoreFoundation.h>
-+#include <IOBluetooth/Bluetooth.h>
- #include <IOBluetooth/IOBluetoothUserLib.h>
-+#include <stdio.h>
-+#include <string.h>
-
- typedef struct {
- int x, y, s;
---- /Users/hans/Documents/Research/HID/wiiremote/aka.wiiremote-b4-src/aka.wiiremote.c 2006-12-22 19:18:31.000000000 -0500
-+++ aka.wiiremote.c 2006-12-28 18:09:23.000000000 -0500
-@@ -4,15 +4,27 @@
- // 1.0B2 : 2006.12.15
- // 1.0B3 : 2006.12.20
-
-+#ifdef PD
-+#include "m_pd.h"
-+#define SETLONG SETFLOAT
-+static t_class *wiiremote_class;
-+#else /* Max */
- #include "ext.h"
-+#endif /* PD */
-+
- #include "wiiremote.h"
-+#include <stdio.h>
-
- #define kInterval 100
- #define kMaxTrial 100
-
- typedef struct _akawiiremote
- {
-+#ifdef PD
-+ t_object x_obj;
-+#else /* Max */
- struct object obj;
-+#endif
-
- WiiRemoteRef wiiremote;
-
-@@ -45,7 +57,11 @@
- void *akawiiremote_new(t_symbol *s, short ac, t_atom *av);
- void akawiiremote_free(t_akawiiremote *x);
-
-+#ifdef PD
-+void wiiremote_setup()
-+#else /* Max */
- void main()
-+#endif /* PD */
- {
- NumVersion outSoftwareVersion;
- BluetoothHCIVersionInfo outHardwareVersion;
-@@ -64,6 +80,32 @@
- return;
- }
-
-+ post("aka.wiiremote 1.0B4-UB by Masayuki Akamatsu");
-+
-+#ifdef PD
-+ post("\tPd port by Hans-Christoph Steiner");
-+
-+ wiiremote_class = class_new(gensym("wiiremote"),
-+ (t_newmethod)akawiiremote_new,
-+ (t_method)akawiiremote_free,
-+ sizeof(t_akawiiremote),
-+ CLASS_DEFAULT,
-+ A_GIMME,0);
-+
-+ class_addbang(wiiremote_class,(t_method)akawiiremote_bang);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_connect,gensym("connect"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_disconnect,gensym("disconnect"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_motionsensor,gensym("motionsensor"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_irsensor,gensym("irsensor"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_vibration,gensym("vibration"), A_DEFFLOAT, 0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_led,gensym("led"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
-+
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getbatterylevel,gensym("getbatterylevel"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getexpansionstatus,gensym("getexpansionstatus"),0);
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_getledstatus,gensym("getledstatus"),0);
-+
-+ class_addmethod(wiiremote_class,(t_method)akawiiremote_assist,gensym("assist"),A_CANT,0);
-+#else /* Max */
- setup((t_messlist **)&akawiiremote_class, (method)akawiiremote_new, (method)akawiiremote_free, (short)sizeof(t_akawiiremote), 0L, A_GIMME, 0);
-
- addbang((method)akawiiremote_bang);
-@@ -79,9 +121,7 @@
- addmess((method)akawiiremote_getledstatus,"getledstatus",0);
-
- addmess((method)akawiiremote_assist,"assist",A_CANT,0);
--
-- post("aka.wiiremote 1.0B4-UB by Masayuki Akamatsu");
--
-+#endif /* PD */
- }
-
- //--------------------------------------------------------------------------------------------
-@@ -93,7 +133,11 @@
- if (x->wiiremote->device == nil)
- return; // do nothing
-
-+#ifdef PD
-+ outlet_float(x->buttonsOut, (t_float) x->wiiremote->buttonData);
-+#else /* Max */
- outlet_int(x->buttonsOut, x->wiiremote->buttonData);
-+#endif /* PD */
-
- if (x->wiiremote->isIRSensorEnabled)
- {
-@@ -241,11 +285,13 @@
-
- void akawiiremote_assist(t_akawiiremote *x, void *b, long m, long a, char *s)
- {
-+#ifndef PD /* Max */
- if (m==ASSIST_INLET)
- {
- sprintf(s,"connect, bang, disconnect....");
- }
- else
-+#endif /* NOT PD */
- {
- switch(a)
- {
-@@ -261,6 +307,20 @@
-
- void *akawiiremote_new(t_symbol *s, short ac, t_atom *av)
- {
-+#ifdef PD
-+ t_akawiiremote *x = (t_akawiiremote *)pd_new(wiiremote_class);
-+
-+ if (x->wiiremote != nil)
-+ wiiremote_init(x->wiiremote);
-+
-+ x->clock = clock_new(x, (t_method)akawiiremote_clock);
-+
-+ /* create anything outlet used for HID data */
-+ x->statusOut = outlet_new(&x->x_obj, 0);
-+ x->buttonsOut = outlet_new(&x->x_obj, &s_float);
-+ x->irOut = outlet_new(&x->x_obj, &s_list);
-+ x->accOut = outlet_new(&x->x_obj, &s_list);
-+#else /* Max */
- t_akawiiremote *x;
-
- x = (t_akawiiremote *)newobject(akawiiremote_class);
-@@ -270,13 +330,14 @@
- wiiremote_init(x->wiiremote);
-
- x->clock = clock_new(x, (method)akawiiremote_clock);
-- x->trial = 0;
-- x->interval = kInterval;
-
- x->statusOut = outlet_new(x, 0);
- x->buttonsOut = intout(x);
- x->irOut = listout(x);
- x->accOut = listout(x);
-+#endif /* PD */
-+ x->trial = 0;
-+ x->interval = kInterval;
-
- return x;
- }
-@@ -290,6 +351,10 @@
- }
-
- clock_unset(x->clock);
-+#ifdef PD
-+ clock_free(x->clock);
-+#else /* Max */
- freeobject((t_object *)x->clock);
-+#endif /* PD */
- }
-
diff --git a/wiiremote/wiiremote-help.pd b/wiiremote/wiiremote-help.pd
index b3faed8..737fe6b 100644
--- a/wiiremote/wiiremote-help.pd
+++ b/wiiremote/wiiremote-help.pd
@@ -1,21 +1,29 @@
-#N canvas 41 171 573 456 10;
+#N canvas 41 171 577 460 10;
#X obj 451 21 import io;
-#X obj 169 251 wiiremote;
-#X msg 124 70 connect;
-#X msg 141 96 disconnect;
-#X msg 242 100 motionsensor \$1;
-#X obj 242 78 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 213 388 wiiremote;
+#X msg 168 207 connect;
+#X msg 185 233 disconnect;
+#X msg 286 237 motionsensor \$1;
+#X obj 286 215 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 406 215 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X msg 406 237 irsensor \$1;
+#X obj 64 254 metro 100;
+#X obj 64 233 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 362 78 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X msg 376 290 getbatterylevel;
+#X msg 376 310 getledstatus;
+#X msg 376 330 getexpansionstatus;
+#X msg 129 283 bang;
+#X text 49 49 - Use the Bluetooth Setup Assistant to setup the WiiRemote
+with your computer (only required for the first use).;
+#X text 49 79 - Press the "Sync" button on the WiiRemote \, four LEDs
+will start blinking.;
+#X text 49 109 - Click on the [connect( message \, the LEDs will stop
+blinking once its connected;
+#X text 49 139 - Start the [metro] to get updates from [wiiremote]
;
-#X msg 362 100 irsensor \$1;
-#X obj 20 117 metro 100;
-#X obj 20 96 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X msg 332 153 getbatterylevel;
-#X msg 332 173 getledstatus;
-#X msg 332 193 getexpansionstatus;
-#X msg 85 146 bang;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;