]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/actuators.h
robofsm: Fix jaw actuator function parameter and update position for holding figure.
[eurobot/public.git] / src / robofsm / actuators.h
index 752dd90553570d1199c08437d7c140d1a9c5f785..09b198f5e9072c3d0347c58b33ea577d6492f821 100644 (file)
@@ -1,9 +1,10 @@
 /**
  * @file actuators.h
  * @author Martin Zidek
- * @date 09/03/25
+ * @author Filip Jares (?)
+ * @date 2009-2010
  *
- * @brief Acttuators library
+ * @brief Robot's actuators control library
  */
 
 /*
@@ -11,7 +12,7 @@
  *
  * Robot's actuators control.
  *
- * Copyright: (c) 2008 CTU Dragons
+ * Copyright: (c) 2008-2010 CTU Dragons
  *            CTU FEE - Department of Control Engineering
  * License: GNU GPL v.2
  */
@@ -25,29 +26,18 @@ of the robot.
 #ifndef ACTUATORS_H
 #define ACTUATORS_H
 
-/* PICKER */
+/* Hokuyo pitch angle limits */ // FIXME: obsolete: delete or update
+#define HOKUYO_PITCH_MAX       0xF8
+#define HOKUYO_PITCH_HORIZONTAL 0xC0
+#define HOKUYO_PITCH_MIN       0x00
 
-#define SERVO_LEFT_CLOSE 0x00 
-#define SERVO_RIGHT_CLOSE 0xFF 
-#define DRIVE_LEFT_ON 0xA0
-#define DRIVE_RIGHT_ON 0xA0
-#define PICK_TIME 20 //multiples of 100 ms
+#include <stdint.h>
 
-/* Positions of lift */
-#define FLOOR1 647
-#define FLOOR2 3478
-
-/* Holder positions */
-#define HOLDER_CLOSED 0
-#define HOLDER_OPEN_MID 20
-#define HOLDER_OPEN_FULL 100
-
-/* Pusher position */
-#define PUSHER_INSIDE 0
-#define PUSHER_OUTSIDE 100
-
-/* Actuators status bits */
-#define ACT_ST_LIFT_ERR 0x01   /* TODO */
+typedef enum {  
+  OPEN,
+  CLOSE,
+  CATCH
+} jaws_cmds;
 
 #ifdef __cplusplus
 extern "C" {
@@ -55,11 +45,15 @@ extern "C" {
 
 void act_init(struct robottype_orte_data *ortedata);
 
-void act_lift(unsigned position);
-void act_chelas(unsigned left, unsigned right);
-void act_belt(int left, int right);
-void act_holder(unsigned position);
-void act_pusher(unsigned position);
+void act_camera_on(void);
+void act_camera_off(void);
+
+void act_lift(uint16_t position, char speed);
+void act_jaws(jaws_cmds cmd);
+
+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
 }