summaryrefslogtreecommitdiff
path: root/tomorrowthegroundGUI
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-08-17 10:36:33 +0100
committerTim Redfern <tim@eclectronics.org>2012-08-17 10:36:33 +0100
commit8323319e8a4759ad4aceac1f72437dfab1221cef (patch)
tree1908666e6ba8ee3972f563a428591082dbec9cdd /tomorrowthegroundGUI
parentc4d254f810058b0e1c9586075c8b411212bbe4a8 (diff)
fix reverse coords bug
Diffstat (limited to 'tomorrowthegroundGUI')
-rw-r--r--tomorrowthegroundGUI/tomorrowthegroundGUI.pde5
1 files changed, 3 insertions, 2 deletions
diff --git a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
index 29fe559..7c2cf6b 100644
--- a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
+++ b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
@@ -12,7 +12,7 @@ void setup()
{
bgmaps=new PImage[2];
sendIP="127.0.0.1";
- int map=2;
+ int map=3;
switch (map) {
case 1:
bgmaps[0] = loadImage("gentmap.png");
@@ -65,7 +65,8 @@ void mouseDragged()
y=mouseY;
float fx=((float)mouseX)/width;
float fy=((float)mouseY)/height;
- udp.send(((fy*fh)+lat2)+","+((fx*fw)+lng1)+"\n",sendIP,5400);
+ udp.send(lat1-((fy*fh))+","+((fx*fw)+lng1)+"\n",sendIP,5400);
+ //println(lat1-((fy*fh))+","+((fx*fw)+lng1));
}
}