]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Add lift and jaws actuators.
authorMichal Vokac <vokac.m@gmail.com>
Thu, 28 Apr 2011 12:40:23 +0000 (14:40 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Thu, 28 Apr 2011 12:40:23 +0000 (14:40 +0200)
Added preliminary version of functions for manipulating with jaws and lift.

src/robofsm/actuators.c
src/robofsm/actuators.h

index 5b749e36f4c1652a3a52b1b93360e44b68a3cf1d..cddd434d7aead9d1d385142756af952910baf2bc 100644 (file)
 
 static struct robottype_orte_data *orte = NULL;
 
+static uint16_t jaw_left_last_request;
+static uint16_t jaw_right_last_request;
+static uint16_t lift_last_request;
+
 void act_init(struct robottype_orte_data *ortedata)
 {
        orte = ortedata;
@@ -40,19 +44,32 @@ void act_camera_off(void)
        ORTEPublicationSend(orte->publication_camera_control);
 }
 
-static uint16_t vidle_last_request;
-
-void act_vidle(uint16_t position, char speed)
+void act_lift(uint16_t position, char speed)
 {
-       orte->vidle_cmd.req_pos = position;
-       orte->vidle_cmd.speed = speed;
+       orte->lift_cmd.req_pos = position;
+       orte->lift_cmd.speed = speed;
        /* Remember the request so that we change check for matching
         * response in rcv_vidle_status_cb() */
-       vidle_last_request = position;
-       ORTEPublicationSend(orte->publication_vidle_cmd);
+       lift_last_request = position;
+       ORTEPublicationSend(orte->publication_lift_cmd);
+}
+
+void act_jaws(struct robottype_orte_data *orte_data)
+{
+        //orte->jaws_cmd;
+}
+
+uint16_t act_jaw_left_get_last_reqest(void)
+{
+        return jaw_left_last_request;
+}
+
+uint16_t act_jaw_right_get_last_reqest(void)
+{
+        return jaw_right_last_request;
 }
 
-uint16_t act_vidle_get_last_reqest(void)
+uint16_t act_lift_get_last_reqest(void)
 {
-       return vidle_last_request;
+       return lift_last_request;
 }
index 49b009758bc64cb633f37cc7d2ecab5303598041..1d4d66350881fe520aa00e258a7ad04df9878891 100644 (file)
@@ -50,8 +50,12 @@ void act_init(struct robottype_orte_data *ortedata);
 void act_camera_on(void);
 void act_camera_off(void);
 
-void act_vidle(uint16_t position, char speed);
-uint16_t act_vidle_get_last_reqest(void);
+void act_lift(uint16_t position, char speed);
+void act_jaws(struct robottype_orte_data *orte_data);
+
+uint16_t act_jaw_left_get_last_reqest(void);
+uint16_t act_jaw_right_get_last_reqest(void);
+uint16_t act_lift_get_last_reqest(void);
 
 #ifdef __cplusplus
 }