aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-12-17 16:56:21 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:08:25 +0200
commit9a6afb879b41110e8ae58cdb2898a6c3a6e3ad3f (patch)
tree448c010ff80899152faf7e42fc96a0a06ddcd930
parent110c6fbdaac1a56dddb6c978eb7a89c195758286 (diff)
fixed crasher, I forgot to include init in the Pd end of things
svn path=/trunk/externals/io/; revision=6928
-rw-r--r--wiiremote/aka.wiiremote.c9
-rw-r--r--wiiremote/wiiremote-help.pd30
2 files changed, 37 insertions, 2 deletions
diff --git a/wiiremote/aka.wiiremote.c b/wiiremote/aka.wiiremote.c
index 6ad24d9..89e6248 100644
--- a/wiiremote/aka.wiiremote.c
+++ b/wiiremote/aka.wiiremote.c
@@ -115,9 +115,12 @@ void main()
void akawiiremote_bang(t_akawiiremote *x)
{
t_atom list[4];
-
- if (x->wiiremote->device == nil)
+
+ if (x->wiiremote->device == nil)
+ {
+ post("warning: your WiiRemote is not connected");
return; // do nothing
+ }
#ifdef PD
outlet_float(x->buttonsOut, (t_float) x->wiiremote->buttonData);
@@ -319,6 +322,8 @@ 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);
diff --git a/wiiremote/wiiremote-help.pd b/wiiremote/wiiremote-help.pd
new file mode 100644
index 0000000..b3faed8
--- /dev/null
+++ b/wiiremote/wiiremote-help.pd
@@ -0,0 +1,30 @@
+#N canvas 41 171 573 456 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 362 78 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#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;
+#X connect 5 0 4 0;
+#X connect 6 0 7 0;
+#X connect 7 0 1 0;
+#X connect 8 0 1 0;
+#X connect 9 0 8 0;
+#X connect 10 0 1 0;
+#X connect 11 0 1 0;
+#X connect 12 0 1 0;
+#X connect 13 0 1 0;