summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgit@eclectronics.org <git@eclectronics.org@eclectronics.org>2012-05-21 09:47:17 +0100
committergit@eclectronics.org <git@eclectronics.org@eclectronics.org>2012-05-21 09:47:17 +0100
commit271e8555f5e225be5870998218e54b3c026b7f57 (patch)
tree83ec2362b2b4e08280eb9a2ad1d80ea19cc99690
parentbe0a3f4b3f536e9cad405d7307324914f3284740 (diff)
gps testing
-rw-r--r--testreceive.pd84
-rwxr-xr-xwim.py5
2 files changed, 59 insertions, 30 deletions
diff --git a/testreceive.pd b/testreceive.pd
index aa1d7e1..5737fed 100644
--- a/testreceive.pd
+++ b/testreceive.pd
@@ -1,28 +1,56 @@
-#N canvas 892 475 529 348 10;
-#X msg 29 61 /pd 1;
-#X msg 82 26 /other 1;
-#X obj 169 50 netreceive 5401 1;
-#X obj 73 219 print play;
-#X obj 140 226 print cc01;
-#X msg 212 215 set \$1;
-#X floatatom 215 283 5 0 0 0 - - -;
-#X obj 225 237 loadbang;
-#X msg 224 260 set 0;
-#X obj 148 140 route play cc01 gps bt;
-#X obj 307 188 print bt;
-#X obj 194 184 route status;
-#X obj 294 239 print gps;
-#X obj 322 162 print other;
-#X connect 0 0 9 0;
-#X connect 1 0 9 0;
-#X connect 2 0 9 0;
-#X connect 5 0 6 0;
-#X connect 7 0 8 0;
-#X connect 8 0 6 0;
-#X connect 9 0 3 0;
-#X connect 9 1 4 0;
-#X connect 9 2 11 0;
-#X connect 9 3 10 0;
-#X connect 9 4 13 0;
-#X connect 11 0 5 0;
-#X connect 11 1 12 0;
+#N canvas 1275 134 693 413 10;
+#X msg 30 20 /pd 1;
+#X msg 86 21 /other 1;
+#X obj 160 22 netreceive 5401 1;
+#X obj 27 96 print play;
+#X obj 145 63 route play cc01 gps bt;
+#X obj 337 114 print bt;
+#X obj 319 85 print other;
+#X obj 102 293 osc~ 440;
+#X obj 72 127 expr ($f1*500)+300;
+#X obj 117 338 dac~;
+#X obj 252 324 vline~;
+#X obj 190 321 *~;
+#X msg 363 286 0 0;
+#X obj 364 245 loadbang;
+#X msg 252 244 1 0 \, 0 0 100;
+#X obj 463 326 vline~;
+#X obj 401 323 *~;
+#X msg 574 288 0 0;
+#X obj 575 247 loadbang;
+#X msg 473 288 1 0 \, 0 0 100;
+#X obj 209 188 moses 1;
+#X obj 400 287 osc~ 4000;
+#X obj 189 285 osc~ 2000;
+#X obj 209 109 route status data;
+#X obj 292 158 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 294 188 1 0 \, 0 0 5;
+#X connect 0 0 4 0;
+#X connect 1 0 4 0;
+#X connect 2 0 4 0;
+#X connect 4 0 3 0;
+#X connect 4 1 8 0;
+#X connect 4 2 23 0;
+#X connect 4 3 5 0;
+#X connect 4 4 6 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 10 0 11 1;
+#X connect 11 0 9 1;
+#X connect 12 0 10 0;
+#X connect 13 0 12 0;
+#X connect 14 0 10 0;
+#X connect 15 0 16 1;
+#X connect 16 0 9 1;
+#X connect 17 0 15 0;
+#X connect 18 0 17 0;
+#X connect 19 0 15 0;
+#X connect 20 0 14 0;
+#X connect 20 1 19 0;
+#X connect 21 0 16 0;
+#X connect 22 0 11 0;
+#X connect 23 0 20 0;
+#X connect 23 1 24 0;
+#X connect 24 0 25 0;
+#X connect 25 0 10 0;
diff --git a/wim.py b/wim.py
index 0db569d..ddc0730 100755
--- a/wim.py
+++ b/wim.py
@@ -101,15 +101,16 @@ while True:
if not gpsfix:
if gpsp.fix>1:
gpsfix=True
- outsock.sendto( "gpsstatus 1\n", (PD_IP, PD_PORT) )
+ outsock.sendto( "gps status 1\n", (PD_IP, PD_PORT) )
if gpsfix:
if gpsp.fix<2:
gpsfix=False
- outsock.sendto( "gpsstatus 0\n", (PD_IP, PD_PORT) )
+ outsock.sendto( "gps status 0\n", (PD_IP, PD_PORT) )
check=gpsp.check()
if check!=False:
if debug==True:
print "wim: received from gps",check[0],check[1]
+ outsock.sendto("gps data"+str(check[0])+" "+str(check[1])+"\n",(PD_IP, PD_PORT) )
pos=latLng(check[0],check[1])
posChanged=True
if posChanged: