From 432d79cbbc00d667580e8afa70d2b7bc2fd3c8de Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 29 Apr 2010 06:08:25 +0200 Subject: [PATCH] robofsm: Add API for controlling 'vidle' --- src/robofsm/actuators.c | 6 ++++++ src/robofsm/actuators.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/robofsm/actuators.c b/src/robofsm/actuators.c index ec1fa70a..c2c4ef51 100644 --- a/src/robofsm/actuators.c +++ b/src/robofsm/actuators.c @@ -47,3 +47,9 @@ void act_camera_off(void) ORTEPublicationSend(orte->publication_camera_control); } +void act_vidle(uint16_t position) +{ + orte->vidle_cmd.req_pos = position; + ORTEPublicationSend(orte->publication_vidle_cmd); +} + diff --git a/src/robofsm/actuators.h b/src/robofsm/actuators.h index 26f6a273..97f256ae 100644 --- a/src/robofsm/actuators.h +++ b/src/robofsm/actuators.h @@ -31,6 +31,9 @@ of the robot. #define HOKUYO_PITCH_HORIZONTAL 0xC0 #define HOKUYO_PITCH_MIN 0x00 +#define VIDLE_UP 0x380 +#define VIDLE_DOWN 0x1e0 + #ifdef __cplusplus extern "C" { #endif @@ -41,6 +44,8 @@ void act_hokuyo(unsigned char angle); // FIXME obsolete (?) void act_camera_on(void); void act_camera_off(void); +void act_vidle(uint16_t position); + #ifdef __cplusplus } #endif -- 2.39.2