From 903c973ef50d63eaf4e92cc0c3253534628d6a6d Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 5 Sep 2012 17:29:15 +0100 Subject: stop slowdown with GUI --- tomorrowthegroundGUI/tomorrowthegroundGUI.pde | 4 ++-- wim.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde index eb716e8..6d8b800 100644 --- a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde +++ b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde @@ -11,7 +11,7 @@ String sendIP; void setup() { bgmaps=new PImage[3]; - sendIP="192.168.15.7"; + sendIP="127.0.0.1"; int map=3; switch (map) { case 1: @@ -42,7 +42,7 @@ void setup() } usemap=0; size(bgmaps[0].width,bgmaps[0].height); - frameRate(15); + frameRate(5); udp = new UDP(this); x=width/2; y=height/2; diff --git a/wim.py b/wim.py index ec77a47..d61cb7c 100755 --- a/wim.py +++ b/wim.py @@ -78,6 +78,7 @@ except: from btscan import * scan=scanner("127.0.0.1",5401,False) + try: for t in doc.bt.trigger: scan.d.dm.triggers[t.id]=(t.command,t.param) @@ -144,5 +145,5 @@ while True: print "wim: sending:",str(r[0]),str(r[1]) #pd needs \n at end of message outsock.sendto( str(r[0])+' '+str(r[1])+'\n', (PD_IP, PD_PORT) ) - time.sleep(1.0) + time.sleep(0.1) -- cgit v1.2.3