Project

General

Profile

Revision 443

stubs for colonet position functions in colonet server

View differences:

trunk/code/projects/colonet/lib/colonet_dragonfly/colonet_dragonfly.c
79 79
}
80 80

  
81 81
static void move_to_position_routine(int x, int y) {
82
  /* TODO emarinel control algorithm */
83
  
82
  /* TODO emarinel - control algorithm */
83
  motor1_set(1, 200);
84
  motor2_set(1, 200);
84 85
}
85 86

  
86 87
/* Private functions */
trunk/code/projects/colonet/ColonetServer/includes/ColonetServer.h
7 7
#define COLONETSERVER_H
8 8

  
9 9
#include <ConnectionPool.h>
10
#include <PositionMonitor.h>
10 11
#include <Log.h>
11 12

  
12 13
class ColonetServer {
......
18 19
  int start_listening(void);
19 20
  int run_server(void);
20 21
  int process_received_wireless_message(int dest, char* data, int len);
22
  PositionMonitor getPositionMonitor(void);
21 23

  
22 24
private:
23 25
  ConnectionPool connection_pool;
24 26
  Log* logger;
25 27
  int listen_socket;
28
  PositionMonitor position_monitor;
26 29

  
27 30
  int initialize_wireless(void);
28 31
  int initialize_connection(int port);
trunk/code/projects/colonet/ColonetServer/includes/PositionMonitor.h
21 21
  int startMonitoring();
22 22
  int stopMonitoring();
23 23
  int getPositions();
24
  
24
  int getRobotPosition(int robot_id, int* xbuf, int* ybuf);
25

  
25 26
 private:
26 27
  VisionPosition * positions;
27 28
};
trunk/code/projects/colonet/ColonetServer/ColonetServer.cpp
245 245

  
246 246
  return 0;
247 247
}
248

  
249
PositionMonitor ColonetServer::getPositionMonitor() {
250
  return position_monitor;
251
}
trunk/code/projects/colonet/ColonetServer/PositionMonitor.cpp
8 8

  
9 9
//TODO: make this file asynchronous
10 10

  
11
#include "includes/PositionMonitor.h"
11
#include <PositionMonitor.h>
12 12
#include <stdlib.h>
13 13
#include <vision.h>
14 14

  
......
39 39

  
40 40
  return 0;
41 41
}
42

  
43
int PositionMonitor::getRobotPosition(int robot_id, int* xbuf, int* ybuf) {
44
  // TODO - fill this in.
45
  
46
  *xbuf = 1;
47
  *ybuf = 1;
48

  
49
  return 0;
50
}

Also available in: Unified diff