]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Add send match time cb. function.
authorMichal Vokac <vokac.m@gmail.com>
Tue, 24 May 2011 00:32:42 +0000 (02:32 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Tue, 24 May 2011 00:32:42 +0000 (02:32 +0200)
src/robofsm/robot_orte.c

index e398228982c73aff267b7c5ec59490f53e3d5cc8..f627920d68154a2894fa554831a3e6f97fe2a665 100644 (file)
@@ -23,6 +23,7 @@
 #include <math.h>
 #include <robomath.h>
 #include "map_handling.h"
+#include "match-timing.h"
 #include <string.h>
 #include <can_msg_def.h>
 #include <actuators.h>
@@ -86,6 +87,13 @@ void send_dummy_cb(const ORTESendInfo *info, void *vinstance,
 {
 }
 
+void send_match_time_cb(const ORTESendInfo *info, void *vinstance,
+                       void *sendCallBackParam)
+{
+       struct match_time_type *instance = (struct match_time_type *)vinstance;
+
+       instance->time = robot_current_time();
+}
 /* ---------------------------------------------------------------------- 
  * SUBSCRIBER CALLBACKS - GENERIC
  * ---------------------------------------------------------------------- */