/**
* @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
*/
/*
*
* 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
*/
#ifndef ACTUATORS_H
#define ACTUATORS_H
-/* Chelas: original values */
-//#define CHELA_CLOSED 0xFF
-//#define CHELA_TIGHT 0xA0
-//#define CHELA_OPEN 0x20
-//#define CHELA_LOOSE 0x80
-
-/* Chelas: */
-#define CHELA_CLOSED 0xFF
-#define CHELA_TIGHT 0xD8
-#define CHELA_OPEN 0x20
-#define CHELA_LOOSE 0xA8
-
-/* FIXME: (temporary, LPCs not ready) Timeout */
-#define CHELA_TIMEOUT 0x07
-
-/* Belts */
-#define BELTS_IN 0xA0 // 160
-#define BELTS_OFF 0x64 // 100
-#define BELTS_OUT 0x28 // 40
-
-#define LIFT_SHIFT 0x1C
-/* Positions of lift */
-#define LIFT_GROUND_POS 0x001A
-#define LIFT_TRAVEL_POS 0x0028
-#define LIFT_BELOW_HOLDER_POS 0x00E0
-#define LIFT_IN_HOLDER_POS 0x0118
-#define LIFT_FLOOR1 0x00E0
-#define LIFT_FLOOR2 0x01A0
-#define LIFT_FLOOR3 0x0264
-#define LIFT_FLOOR4 0x0322
-#define LIFT_MAX 0x03C0
-
-/* Holder positions */
-#define HOLDER_CLOSED 0xFF
-#define HOLDER_TIGHT 0xE0
-#define HOLDER_LOOSE 0xDA
-#define HOLDER_OPENED 0x10
-
-/* Pusher position */
-#define PUSHER_INSIDE 0
-#define PUSHER_LINTEL_BOUNDARY 0xC0
-#define PUSHER_OUTSIDE PUSHER_LINTEL_BOUNDARY
-
-/* Hokuyo pitch angle limits */
+/* Hokuyo pitch angle limits */ // FIXME: obsolete: delete or update
#define HOKUYO_PITCH_MAX 0xF8
#define HOKUYO_PITCH_HORIZONTAL 0xC0
#define HOKUYO_PITCH_MIN 0x00
-/* Actuators status bits */
-#define ACT_ST_LIFT_ERR 0x01 /* TODO */
+#include <stdint.h>
+
+typedef enum {
+ OPEN,
+ CLOSE,
+ CATCH
+} jaws_cmds;
#ifdef __cplusplus
extern "C" {
void act_init(struct robottype_orte_data *ortedata);
-void act_lift(unsigned short int position);
-void act_chelae(unsigned char left, unsigned char right);
-void act_belts(unsigned char left, unsigned char right);
-void act_holder(unsigned char position);
-void act_pusher(unsigned short int position);
-void act_hokuyo(unsigned char angle);
+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
}