]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/robot.cc
robofsm : map_handling
[eurobot/public.git] / src / robofsm / robot.cc
index b56af5ba5b5f346e22b198a307685db8c774c6b2..6090fed133f6a070e0054ff4d72798bb1ac393d7 100644 (file)
 #include <sys/time.h>
 #include <time.h>
 #include <unistd.h>
-#include "map_handling.h"
 #include <string.h>
 #include <robodim.h>
 #include <ul_log.h>
 #include "fsmmove.cc"
+#include "map_handling.h"
 
 
 /* Subtract the `struct timespec' values X and Y,
@@ -104,7 +104,7 @@ int Robot::init() {
 
        ignore_hokuyo = false;
        
-       map = ShmapInit(1);
+       map_handle.set_map(ShmapInit(1));
 //     fill_in_known_areas_in_map();
 
        signal(SIGINT, int_handler);
@@ -190,7 +190,7 @@ err:
  * Signals all the robot threads to finish.
  */
 void Robot::robot_exit() {
-       destroy();
+       sched.terminate();
 }