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 void act_camera_on(void)
33 orte->camera_control.on = 1;
34 ORTEPublicationSend(orte->publication_camera_control);
37 void act_camera_off(void)
39 orte->camera_control.on = 0;
40 ORTEPublicationSend(orte->publication_camera_control);
43 void act_magnet(unsigned char on)
45 orte->magnet_cmd.on = on;
46 ORTEPublicationSend(orte->publication_magnet_cmd);
49 static int crane_last_request;
51 void act_crane(int position)
53 orte->crane_cmd.req_pos = position;
54 /* Remember the request so that we change check for matching
55 * response in rcv_crane_status_cb() */
56 crane_last_request = position;
57 ORTEPublicationSend(orte->publication_crane_cmd);
60 int act_crane_get_last_reqest(void)
62 return crane_last_request;