]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/lidars/hokuyo/hokuyo.c
Create LIDAR lib for hadling both rangefinders - SICK and Hokuyo
[eurobot/public.git] / src / lidars / hokuyo / hokuyo.c
similarity index 96%
rename from src/hokuyo/hokuyo.c
rename to src/lidars/hokuyo/hokuyo.c
index 8201a53f8efa63cac6729f866b3cdb131b57f8f6..acf0341f51f8753f1e3c3b00d52dc32fc39f70eb 100644 (file)
@@ -13,6 +13,7 @@
 #include<sys/termios.h>
 #include <string.h>
 #include "hokuyo.h"
+#include <lidar_params.h>
 #include <urg_ctrl.h>
 #include <robottype.h>
 #include <roboorte_robottype.h>
@@ -28,7 +29,7 @@
        typedef char msg[(cond) ? 1 : -1]
 
 COMPILE_TIME_ASSERT(HOKUYO_FINAL_MEASUREMENT - HOKUYO_INITIAL_MEASUREMENT == HOKUYO_ARRAY_SIZE,
-                   wrong_size_of_hokuyo_scan_type);
+                   wrong_size_of_lidar_scan_type);
 
 static urg_t urg;
 static long *scan;
@@ -161,6 +162,9 @@ int main(int argc, char **argv)
                  if (errors[i])
                          printf(", error %d: %dx", i, errors[i]);
          printf("\n");
+
+         orte.hokuyo_scan.data_lenght = hokuyo_params.data_lenght;
+         orte.hokuyo_scan.lidar_type = hokuyo_params.type;
          ORTEPublicationSend(orte.publication_hokuyo_scan);
   }