diff --git a/conf/airframes/Poine/booz2_a7.xml b/conf/airframes/Poine/booz2_a7.xml index 2d5bd4a815..ce2895d005 100644 --- a/conf/airframes/Poine/booz2_a7.xml +++ b/conf/airframes/Poine/booz2_a7.xml @@ -177,7 +177,7 @@ - + diff --git a/conf/modules/vehicle_interface_overo_link.xml b/conf/modules/vehicle_interface_overo_link.xml new file mode 100644 index 0000000000..d16940d8a0 --- /dev/null +++ b/conf/modules/vehicle_interface_overo_link.xml @@ -0,0 +1,16 @@ + + + +
+ +
+ + + + + + + +
+ + diff --git a/sw/airborne/modules/vehicle_interface/vi.h b/sw/airborne/modules/vehicle_interface/vi.h index 5048cea659..81d45de76e 100644 --- a/sw/airborne/modules/vehicle_interface/vi.h +++ b/sw/airborne/modules/vehicle_interface/vi.h @@ -1,7 +1,7 @@ /* * $Id: $ * - * Copyright (C) 2008-2010 The Paparazzi Team + * Copyright (C) 2010 The Paparazzi Team * * This file is part of paparazzi. * @@ -97,7 +97,7 @@ extern void vi_impl_periodic(void); extern void vi_impl_set_enabled(bool_t enabled); -#define vi_SetEnabled(_val) { \ +#define vi_SetEnabled(_val) { \ vi.enabled = _val; \ vi_set_enabled(_val); \ } diff --git a/sw/airborne/modules/vehicle_interface/vi_datalink.c b/sw/airborne/modules/vehicle_interface/vi_datalink.c index 9cb7b8d4dd..d4d5fcb714 100644 --- a/sw/airborne/modules/vehicle_interface/vi_datalink.c +++ b/sw/airborne/modules/vehicle_interface/vi_datalink.c @@ -1,7 +1,7 @@ /* - * $Id: $ + * $Id$ * - * Copyright (C) 2008-2010 The Paparazzi Team + * Copyright (C) 2010 The Paparazzi Team * * This file is part of paparazzi. * @@ -21,7 +21,7 @@ * Boston, MA 02111-1307, USA. */ -#include "vehicle_interface/vi_datalink.h" +#include "modules/vehicle_interface/vi_datalink.h" void vi_impl_init(void) { } diff --git a/sw/airborne/modules/vehicle_interface/vi_datalink.h b/sw/airborne/modules/vehicle_interface/vi_datalink.h index 0f20a084ad..f971d27e20 100644 --- a/sw/airborne/modules/vehicle_interface/vi_datalink.h +++ b/sw/airborne/modules/vehicle_interface/vi_datalink.h @@ -1,5 +1,7 @@ /* - * $Id: booz_fms_datalink.h 5216 2010-08-04 17:13:43Z gautier $ + * $Id$ + * + * Copyright (C) 2010 The Paparazzi Team * * This is the implementation of the "external interface" to the autopilot. * using datalink messages. @@ -23,7 +25,7 @@ #define VEHICLE_INTERFACE_DATALINK_H #include "std.h" -#include "vehicle_interface/vi.h" +#include "modules/vehicle_interface/vi.h" #include "math/pprz_algebra_int.h" #ifndef VI_MAX_H_SPEED @@ -41,58 +43,62 @@ extern void vi_update_wp(uint8_t wp_id); #ifdef VI_PHI_THETA_MAX -#define VI_LIMIT_ATTITUDE(_att) { \ - BoundAbs(_att.phi, VI_PHI_THETA_MAX); \ - BoundAbs(_att.theta, VI_PHI_THETA_MAX); \ -} +#define VI_LIMIT_ATTITUDE(_att) { \ + BoundAbs(_att.phi, VI_PHI_THETA_MAX); \ + BoundAbs(_att.theta, VI_PHI_THETA_MAX); \ + } #else #define VI_LIMIT_ATTITUDE(_x) {} #endif -#define VI_PARSE_DATALINK(_dl_buffer) { \ - vi.last_msg = 0; \ - vi.input.h_mode = DL_BOOZ2_FMS_COMMAND_h_mode(_dl_buffer); \ - vi.input.v_mode = DL_BOOZ2_FMS_COMMAND_v_mode(_dl_buffer); \ - switch (vi.input.h_mode) { \ +#define VI_PARSE_DATALINK(_dl_buffer) { \ + vi.last_msg = 0; \ + vi.input.h_mode = DL_BOOZ2_FMS_COMMAND_h_mode(_dl_buffer); \ + vi.input.v_mode = DL_BOOZ2_FMS_COMMAND_v_mode(_dl_buffer); \ + switch (vi.input.h_mode) { \ case BOOZ2_GUIDANCE_H_MODE_KILL: \ case BOOZ2_GUIDANCE_H_MODE_RATE : \ break; \ case BOOZ2_GUIDANCE_H_MODE_ATTITUDE : \ { \ - vi.input.h_sp.attitude.phi = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \ - vi.input.h_sp.attitude.theta = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \ - vi.input.h_sp.attitude.psi = DL_BOOZ2_FMS_COMMAND_h_sp_3(_dl_buffer); \ - ANGLE_REF_NORMALIZE(vi.input.h_sp.attitude.psi); \ - VI_LIMIT_ATTITUDE(vi.input.h_sp.attitude); \ + vi.input.h_sp.attitude.phi = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \ + vi.input.h_sp.attitude.theta = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \ + vi.input.h_sp.attitude.psi = DL_BOOZ2_FMS_COMMAND_h_sp_3(_dl_buffer); \ + ANGLE_REF_NORMALIZE(vi.input.h_sp.attitude.psi); \ + VI_LIMIT_ATTITUDE(vi.input.h_sp.attitude); \ } \ - break; \ + break; \ case BOOZ2_GUIDANCE_H_MODE_HOVER : \ { \ - vi.input.h_sp.pos.x = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \ - vi.input.h_sp.pos.y = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \ + vi.input.h_sp.pos.x = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \ + vi.input.h_sp.pos.y = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \ } \ - break; \ + break; \ case BOOZ2_GUIDANCE_H_MODE_NAV : \ - { \ + { \ vi.input.h_sp.speed.x = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \ vi.input.h_sp.speed.y = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \ vi.input.h_sp.speed.z = DL_BOOZ2_FMS_COMMAND_h_sp_3(_dl_buffer); \ - } \ + } \ + break; \ + default: \ break; \ } \ - switch (vi.input.v_mode) { \ + switch (vi.input.v_mode) { \ case BOOZ2_GUIDANCE_V_MODE_KILL: \ case BOOZ2_GUIDANCE_V_MODE_RC_DIRECT: \ case BOOZ2_GUIDANCE_V_MODE_RC_CLIMB: \ break; \ case BOOZ2_GUIDANCE_V_MODE_CLIMB : \ - vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \ + vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \ break; \ case BOOZ2_GUIDANCE_V_MODE_HOVER : \ - vi.input.v_sp.height = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \ + vi.input.v_sp.height = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \ break; \ case BOOZ2_GUIDANCE_V_MODE_NAV : \ - vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \ + vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \ + break; \ + default: \ break; \ } \ } diff --git a/sw/airborne/modules/vehicle_interface/vi_overo_link.c b/sw/airborne/modules/vehicle_interface/vi_overo_link.c new file mode 100644 index 0000000000..5ceec28f1e --- /dev/null +++ b/sw/airborne/modules/vehicle_interface/vi_overo_link.c @@ -0,0 +1,37 @@ +/* + * $Id$ + * + * Copyright (C) 2010 The Paparazzi Team + * + * This file is part of paparazzi. + * + * paparazzi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * paparazzi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with paparazzi; see the file COPYING. If not, write to + * the Free Software Foundation, 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "modules/vehicle_interface/vi_overo_link.h" + +void vi_impl_init(void) { + +} + +void vi_impl_periodic(void) { + +} + +void vi_impl_set_enabled(bool_t enabled __attribute__ ((unused))) { + +} + diff --git a/sw/airborne/modules/vehicle_interface/vi_overo_link.h b/sw/airborne/modules/vehicle_interface/vi_overo_link.h new file mode 100644 index 0000000000..2ce2011b76 --- /dev/null +++ b/sw/airborne/modules/vehicle_interface/vi_overo_link.h @@ -0,0 +1,35 @@ +/* + * $Id$ + * + * Copyright (C) 2010 The Paparazzi Team + * + * This is the implementation of the "external interface" to the autopilot. + * using datalink messages. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef VEHICLE_INTERFACE_OVERO_LINK_H +#define VEHICLE_INTERFACE_OVERO_LINK_H + +#include "std.h" +#include "modules/vehicle_interface/vi.h" +#include "math/pprz_algebra_int.h" + + + + + +#endif /* VEHICLE_INTERFACE_OVERO_LINK_H */