Index: trunk/code/projects/colonet/robot/colonet_dragonfly/colonet_dragonfly.c
===================================================================
--- trunk/code/projects/colonet/robot/colonet_dragonfly/colonet_dragonfly.c	(revision 658)
+++ trunk/code/projects/colonet/robot/colonet_dragonfly/colonet_dragonfly.c	(revision 659)
@@ -130,7 +130,7 @@
   //  sprintf(buf,"ex:%d ey:%d vx:%d vy:%d\n", e_x, e_y, v_x, v_y);
   //  usb_puts(buf);
 
-  return 150;
+  return 250;
   
   /*
   long e_mag = sqrt_100_approx(e_x*e_x + e_y*e_y);
Index: trunk/code/projects/colonet/server/Command.cpp
===================================================================
--- trunk/code/projects/colonet/server/Command.cpp	(revision 658)
+++ trunk/code/projects/colonet/server/Command.cpp	(revision 659)
@@ -266,6 +266,10 @@
     colonet_server->getPositionMonitor()->assignRealId(atoi(tokens[2]), atoi(tokens[3]));
     break;
 
+  case CLIENT_SET_VIRTUAL_WALL:
+    colonet_server->getVirtualWall()->set_coordinates(atoi(tokens[2]), atoi(tokens[3]), atoi(tokens[4]), atoi(tokens[5]));
+    break;
+
   default:
     char* my_current_message = "Invalid request!\n";
     //printf("Sending %s\n", my_current_message);
Index: trunk/code/projects/colonet/server/includes/ColonetServer.h
===================================================================
--- trunk/code/projects/colonet/server/includes/ColonetServer.h	(revision 658)
+++ trunk/code/projects/colonet/server/includes/ColonetServer.h	(revision 659)
@@ -9,8 +9,9 @@
  class ConnectionPool;
 
 #include <ConnectionPool.h>
+#include <Log.h>
 #include <PositionMonitor.h>
-#include <Log.h>
+#include <VirtualWall.h>
 
 class ColonetServer {
 public:
@@ -22,6 +23,7 @@
   int run_server(void);
   int process_received_wireless_message(int dest, char* data, int len);
   PositionMonitor* getPositionMonitor(void);
+  VirtualWall* getVirtualWall(void);
   int run_position_monitor(void);
 
 private:
@@ -29,6 +31,7 @@
   Log* logger;
   int listen_socket;
   PositionMonitor position_monitor;
+  VirtualWall virtual_wall;
 
   int initialize_wireless(void);
   int initialize_connection(int port);
Index: trunk/code/projects/colonet/server/includes/VirtualWall.h
===================================================================
--- trunk/code/projects/colonet/server/includes/VirtualWall.h	(nonexistent)
+++ trunk/code/projects/colonet/server/includes/VirtualWall.h	(revision 659)
@@ -0,0 +1,24 @@
+/**
+ * Eugene Marinelli
+ * 
+ */
+
+#ifndef VIRTUALWALL_H
+#define VIRTUALWALL_H
+
+class VirtualWall {
+ public:
+  VirtualWall(void);
+  ~VirtualWall(void);
+
+  int set_coordinates(int upper_x, int upper_y, int lower_x, int lower_y);
+  void clear(void);
+  int get_coordinates(int* upper_x, int* upper_y, int* lower_x, int* lower_y);
+
+ private:
+  bool wall_available;
+  int upper_left_x, upper_left_y;
+  int lower_right_x, lower_right_y;
+};
+
+#endif
Index: trunk/code/projects/colonet/server/VirtualWall.cpp
===================================================================
--- trunk/code/projects/colonet/server/VirtualWall.cpp	(nonexistent)
+++ trunk/code/projects/colonet/server/VirtualWall.cpp	(revision 659)
@@ -0,0 +1,44 @@
+/**
+ * Eugene Marinelli
+ */
+
+#include <VirtualWall.h>
+
+VirtualWall::VirtualWall(void) {
+  wall_available = false;
+}
+
+VirtualWall::~VirtualWall(void) {
+}
+
+int VirtualWall::set_coordinates(int upper_x, int upper_y, int lower_x, int lower_y) {
+  if (upper_x < 0 || upper_y < 0 || lower_x < 0 || lower_y < 0) {
+    return -1;
+  }
+
+  upper_left_x = upper_x;
+  upper_left_y = upper_y;
+  lower_right_x = lower_x;
+  lower_right_y = lower_y;
+
+  wall_available = true;
+
+  return 0;
+}
+
+void VirtualWall::clear() {
+  wall_available = false;
+}
+
+int VirtualWall::get_coordinates(int* upper_x, int* upper_y, int* lower_x, int* lower_y) {
+  if (wall_available) {
+    *upper_x = upper_left_x;
+    *upper_y = upper_left_y;
+    *lower_x = lower_right_x;
+    *lower_y = lower_right_y;
+
+    return 0;
+  } else {
+    return -1;
+  }
+}
Index: trunk/code/projects/colonet/server/ColonetServer.cpp
===================================================================
--- trunk/code/projects/colonet/server/ColonetServer.cpp	(revision 658)
+++ trunk/code/projects/colonet/server/ColonetServer.cpp	(revision 659)
@@ -288,3 +288,7 @@
 PositionMonitor* ColonetServer::getPositionMonitor() {
   return &position_monitor;
 }
+
+VirtualWall* ColonetServer::getVirtualWall() {
+  return &virtual_wall;
+}
Index: trunk/code/projects/colonet/server/Makefile
===================================================================
--- trunk/code/projects/colonet/server/Makefile	(revision 658)
+++ trunk/code/projects/colonet/server/Makefile	(revision 659)
@@ -6,7 +6,7 @@
 CFLAGS = -Wall -Wshadow -Wextra -g
 VISIONFLAGS = -ggdb `pkg-config opencv --cflags --libs` 
 
-COLONETCPPFILES = Main.cpp ColonetServer.cpp ConnectionPool.cpp Command.cpp colonet_wireless.cpp PositionMonitor.cpp
+COLONETCPPFILES = Main.cpp ColonetServer.cpp ConnectionPool.cpp Command.cpp colonet_wireless.cpp PositionMonitor.cpp VirtualWall.cpp
 COLONETCPPOBJECTS = $(COLONETCPPFILES:.cpp=.o)
 COLONETFILES = options.c
 COLONETOBJECTS = $(COLONETFILES:.c=.o)
Index: trunk/code/projects/colonet/server/PositionMonitor.cpp
===================================================================
--- trunk/code/projects/colonet/server/PositionMonitor.cpp	(revision 658)
+++ trunk/code/projects/colonet/server/PositionMonitor.cpp	(revision 659)
@@ -16,7 +16,7 @@
 using namespace std;
 
 #define MAX_POSITIONS 20
-#define SAME_ROBOT_DISTANCE_THRESHOLD 110
+#define SAME_ROBOT_DISTANCE_THRESHOLD 150
 #define ROBOT_DELETE_BUFFER 10
 #define CAM_UPDATE_PERIOD 100000
 
Index: trunk/code/projects/colonet/common/colonet_defs.h
===================================================================
--- trunk/code/projects/colonet/common/colonet_defs.h	(revision 658)
+++ trunk/code/projects/colonet/common/colonet_defs.h	(revision 659)
@@ -151,6 +151,8 @@
 
 #define SERVER_REPORT_ROBOT_LOST 0x58
 
+#define CLIENT_SET_VIRTUAL_WALL 0x59
+
 /* End low-level robot commands */
 
 
