5 * @author Filip Jares (?)
8 * @brief Robot's actuators control library
12 * actuators.c 09/02/25
14 * Robot's actuators control.
16 * Copyright: (c) 2008-2010 CTU Dragons
17 * CTU FEE - Department of Control Engineering
18 * License: GNU GPL v.2
22 #include <actuators.h>
24 static struct robottype_orte_data *orte = NULL;
26 void act_init(struct robottype_orte_data *ortedata)
31 // FIXME: obsolete (?)
32 void act_hokuyo(unsigned char angle)
34 orte->hokuyo_pitch.angle = angle;
35 ORTEPublicationSend(orte->publication_hokuyo_pitch);
38 void act_camera_on(void)
40 orte->camera_control.on = 1;
41 ORTEPublicationSend(orte->publication_camera_control);
44 void act_camera_off(void)
46 orte->camera_control.on = 0;
47 ORTEPublicationSend(orte->publication_camera_control);
50 static uint16_t vidle_last_request;
52 void act_vidle(uint16_t position, char speed)
54 orte->vidle_cmd.req_pos = position;
55 orte->vidle_cmd.speed = speed;
56 /* Remember the request so that we change check for matching
57 * response in rcv_vidle_status_cb() */
58 vidle_last_request = position;
59 ORTEPublicationSend(orte->publication_vidle_cmd);
62 uint16_t act_vidle_get_last_reqest(void)
64 return vidle_last_request;