diff --git a/conf/airframes/ENAC/fixed-wing/firestorm.xml b/conf/airframes/ENAC/fixed-wing/firestorm.xml index dd33191fa4..71ff99db8c 100644 --- a/conf/airframes/ENAC/fixed-wing/firestorm.xml +++ b/conf/airframes/ENAC/fixed-wing/firestorm.xml @@ -8,7 +8,7 @@ - + diff --git a/conf/modules/MPPT.xml b/conf/modules/MPPT.xml index 7c8c043f7c..d50df38d8c 100644 --- a/conf/modules/MPPT.xml +++ b/conf/modules/MPPT.xml @@ -1,6 +1,6 @@ - + Maximum Power Point Tracker diff --git a/conf/modules/bat_checker.xml b/conf/modules/bat_checker.xml index 4d0861b8ec..ff8e279f8d 100644 --- a/conf/modules/bat_checker.xml +++ b/conf/modules/bat_checker.xml @@ -1,6 +1,6 @@ - + Battery checker module diff --git a/conf/modules/deploy_sonar_buoy.xml b/conf/modules/deploy_sonar_buoy.xml deleted file mode 100644 index c3fa12f462..0000000000 --- a/conf/modules/deploy_sonar_buoy.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Toggle two gpio pins (Lisa). - The application in this was written for drops two sonar buoys. - - - - - - - - - - - - - - - - -
- -
- - - - - -
- - diff --git a/conf/modules/gain_scheduling.xml b/conf/modules/gain_scheduling.xml index 48e9c2e53e..2281a7caf9 100644 --- a/conf/modules/gain_scheduling.xml +++ b/conf/modules/gain_scheduling.xml @@ -1,6 +1,6 @@ - + Gain set interpolation. diff --git a/conf/modules/gps_i2c.xml b/conf/modules/gps_i2c.xml index f809e73c90..5db107fc91 100644 --- a/conf/modules/gps_i2c.xml +++ b/conf/modules/gps_i2c.xml @@ -1,6 +1,6 @@ - + U-blox GPS (I2C) diff --git a/conf/modules/led_safety_status.xml b/conf/modules/led_safety_status.xml index 1bfcfc7a29..0c418b5332 100644 --- a/conf/modules/led_safety_status.xml +++ b/conf/modules/led_safety_status.xml @@ -1,6 +1,6 @@ - + LED safety indicator. diff --git a/conf/modules/poles.xml b/conf/modules/nav_poles.xml similarity index 81% rename from conf/modules/poles.xml rename to conf/modules/nav_poles.xml index f599d055e3..c29e0a6e45 100644 --- a/conf/modules/poles.xml +++ b/conf/modules/nav_poles.xml @@ -1,15 +1,15 @@ - + Navigate around two poles - + - + diff --git a/conf/modules/osd_max7456.xml b/conf/modules/osd_max7456.xml index 7b54b9679a..4a6a6db53f 100644 --- a/conf/modules/osd_max7456.xml +++ b/conf/modules/osd_max7456.xml @@ -1,6 +1,6 @@ - + MAX7456 driver (SPI) diff --git a/sw/airborne/modules/gain_scheduling/gain_scheduling.c b/sw/airborne/modules/ctrl/gain_scheduling.c similarity index 97% rename from sw/airborne/modules/gain_scheduling/gain_scheduling.c rename to sw/airborne/modules/ctrl/gain_scheduling.c index 514d788bb6..b5b4752999 100644 --- a/sw/airborne/modules/gain_scheduling/gain_scheduling.c +++ b/sw/airborne/modules/ctrl/gain_scheduling.c @@ -19,11 +19,11 @@ * Boston, MA 02111-1307, USA. */ -/** @file gain_scheduling.c +/** @file modules/ctrl/gain_scheduling.c * Module that interpolates gainsets in flight based on a scheduling variable */ -#include "gain_scheduling.h" +#include "modules/ctrl/gain_scheduling.h" //Include for scheduling on transition_status #include "firmwares/rotorcraft/guidance/guidance_h.h" @@ -131,4 +131,4 @@ void gain_scheduling_periodic(void) void set_gainset(int gainset) { stabilization_gains = gainlibrary[gainset]; -} \ No newline at end of file +} diff --git a/sw/airborne/modules/gain_scheduling/gain_scheduling.h b/sw/airborne/modules/ctrl/gain_scheduling.h similarity index 97% rename from sw/airborne/modules/gain_scheduling/gain_scheduling.h rename to sw/airborne/modules/ctrl/gain_scheduling.h index 4a5de10e1d..25312f2248 100644 --- a/sw/airborne/modules/gain_scheduling/gain_scheduling.h +++ b/sw/airborne/modules/ctrl/gain_scheduling.h @@ -20,7 +20,7 @@ */ /** - * @file gain_scheduling.h + * @file modules/ctrl/gain_scheduling.h * * Module that interpolates between gain sets, depending on the scheduling variable. */ diff --git a/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.c b/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.c deleted file mode 100644 index 29df594c85..0000000000 --- a/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Eric Parsonage - * - * 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 -#include -#include "deploy_sonar_buoy.h" -#include "generated/airframe.h" - -/* simple module to toggle two gpio pins on Lisa. - * The application in this was written for drops - * two sonar buoys. TODO extend to a generalised - * GPIO module - */ - -bool_t buoy_1; -bool_t buoy_2; - -/* initialises GPIO pins */ -void deploy_sonar_buoy_init(void) -{ - /* initialise peripheral clock for port C */ - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); - GPIO_InitTypeDef GPIO_InitStructure; - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_Init(GPIOC, &GPIO_InitStructure); - /* set port C pin 5 to be low */ - GPIO_WriteBit(GPIOC, GPIO_Pin_5 , Bit_RESET); - - /* initialise peripheral clock for port B */ - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_Init(GPIOB, &GPIO_InitStructure); - /* set port B pin 0 to be low */ - GPIO_WriteBit(GPIOB, GPIO_Pin_0 , Bit_RESET); - - /* set the variables of interest to be FALSE */ - buoy_1 = FALSE; - buoy_2 = FALSE; - deploy_sonar_buoy_periodic(); -} - -/* sets GPIO pins */ -void deploy_sonar_buoy_periodic(void) -{ - GPIO_WriteBit(GPIOC, GPIO_Pin_5 , buoy_1 ? Bit_SET : Bit_RESET); - GPIO_WriteBit(GPIOB, GPIO_Pin_0 , buoy_2 ? Bit_SET : Bit_RESET); -} diff --git a/sw/airborne/modules/max7456/max7456.c b/sw/airborne/modules/display/max7456.c similarity index 99% rename from sw/airborne/modules/max7456/max7456.c rename to sw/airborne/modules/display/max7456.c index 05a8d497b8..a66bdaff7a 100644 --- a/sw/airborne/modules/max7456/max7456.c +++ b/sw/airborne/modules/display/max7456.c @@ -20,7 +20,7 @@ */ /** - * @file modules/max7456/max7456.c + * @file modules/display/max7456.c * Maxim MAX7456 single-channel monochrome on-screen display driver. * */ @@ -46,8 +46,8 @@ #endif // Peripherials -#include "max7456.h" -#include "max7456_regs.h" +#include "modules/display/max7456.h" +#include "modules/display/max7456_regs.h" #define OSD_STRING_SIZE 31 #define osd_sprintf _osd_sprintf diff --git a/sw/airborne/modules/max7456/max7456.h b/sw/airborne/modules/display/max7456.h similarity index 89% rename from sw/airborne/modules/max7456/max7456.h rename to sw/airborne/modules/display/max7456.h index 64b111f160..b2e47a0af6 100644 --- a/sw/airborne/modules/max7456/max7456.h +++ b/sw/airborne/modules/display/max7456.h @@ -20,6 +20,12 @@ * */ +/** + * @file modules/display/max7456.h + * Maxim MAX7456 single-channel monochrome on-screen display driver. + * + */ + #ifndef MAX7456_H #define MAX7456_H diff --git a/sw/airborne/modules/max7456/max7456_regs.h b/sw/airborne/modules/display/max7456_regs.h similarity index 80% rename from sw/airborne/modules/max7456/max7456_regs.h rename to sw/airborne/modules/display/max7456_regs.h index 5e643469c8..26885581ed 100644 --- a/sw/airborne/modules/max7456/max7456_regs.h +++ b/sw/airborne/modules/display/max7456_regs.h @@ -1,3 +1,32 @@ +/* + * Copyright (C) 2013 Chris + * + * 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. + * + */ + +/** + * @file modules/display/max7456_regs.h + * Maxim MAX7456 single-channel monochrome on-screen display driver. + * + * Registers definition + */ + #ifndef MAX7456_REGS_H #define MAX7456_REGS_H diff --git a/sw/airborne/modules/MPPT/MPPT.c b/sw/airborne/modules/energy/MPPT.c similarity index 98% rename from sw/airborne/modules/MPPT/MPPT.c rename to sw/airborne/modules/energy/MPPT.c index 3d51e8e3aa..4112331b07 100644 --- a/sw/airborne/modules/MPPT/MPPT.c +++ b/sw/airborne/modules/energy/MPPT.c @@ -21,13 +21,13 @@ */ /** - * @file modules/MPPT/MPPT.c + * @file modules/energy/MPPT.c * @brief Solar cells MPTT monitoring * */ #include -#include "MPPT.h" +#include "modules/energy/MPPT.h" #include "firmwares/fixedwing/main_fbw.h" #include "mcu_periph/i2c.h" diff --git a/sw/airborne/modules/MPPT/MPPT.h b/sw/airborne/modules/energy/MPPT.h similarity index 97% rename from sw/airborne/modules/MPPT/MPPT.h rename to sw/airborne/modules/energy/MPPT.h index d1ab056aaa..d0433eb14a 100644 --- a/sw/airborne/modules/MPPT/MPPT.h +++ b/sw/airborne/modules/energy/MPPT.h @@ -21,7 +21,7 @@ */ /** - * @file modules/MPPT/MPPT.h + * @file modules/energy/MPPT.h * @brief Solar cells MPTT monitoring * */ diff --git a/sw/airborne/modules/bat_checker/bat_checker.c b/sw/airborne/modules/energy/bat_checker.c similarity index 95% rename from sw/airborne/modules/bat_checker/bat_checker.c rename to sw/airborne/modules/energy/bat_checker.c index 0de6fe633b..64306bbac4 100644 --- a/sw/airborne/modules/bat_checker/bat_checker.c +++ b/sw/airborne/modules/energy/bat_checker.c @@ -20,14 +20,14 @@ */ /** - * @file modules/bat_checker/bat_checker.c + * @file modules/energy/bat_checker.c * * Activate a buzzer/LED periodically or periodically to warn of low/critical battery level. * At LOW_BAT_LEVEL the buzzer will be activated periodically. * At CRITIC_BAT_LEVEL the buzzer will be activated permanently. */ -#include "bat_checker.h" +#include "modules/energy/bat_checker.h" #include "generated/airframe.h" #include "generated/modules.h" #include "subsystems/electrical.h" diff --git a/sw/airborne/modules/bat_checker/bat_checker.h b/sw/airborne/modules/energy/bat_checker.h similarity index 96% rename from sw/airborne/modules/bat_checker/bat_checker.h rename to sw/airborne/modules/energy/bat_checker.h index 5a3304e9fa..aa75137a99 100644 --- a/sw/airborne/modules/bat_checker/bat_checker.h +++ b/sw/airborne/modules/energy/bat_checker.h @@ -20,7 +20,7 @@ */ /** - * @file modules/bat_checker/bat_checker.c + * @file modules/energy/bat_checker.c * * Activate a buzzer/LED periodically or periodically to warn of low/critical battery level. * At LOW_BAT_LEVEL the buzzer will be activated periodically. diff --git a/sw/airborne/modules/MPPT/sim_MPPT.c b/sw/airborne/modules/energy/sim_MPPT.c similarity index 97% rename from sw/airborne/modules/MPPT/sim_MPPT.c rename to sw/airborne/modules/energy/sim_MPPT.c index e4a8e7d9f1..1b0e6a82be 100644 --- a/sw/airborne/modules/MPPT/sim_MPPT.c +++ b/sw/airborne/modules/energy/sim_MPPT.c @@ -21,7 +21,7 @@ */ -#include "MPPT.h" +#include "modules/energy/MPPT.h" #include "messages.h" #include "subsystems/datalink/downlink.h" diff --git a/sw/airborne/modules/gps_i2c/gps_i2c.c b/sw/airborne/modules/gps/gps_i2c.c similarity index 99% rename from sw/airborne/modules/gps_i2c/gps_i2c.c rename to sw/airborne/modules/gps/gps_i2c.c index fa1ad69c61..07241cce31 100644 --- a/sw/airborne/modules/gps_i2c/gps_i2c.c +++ b/sw/airborne/modules/gps/gps_i2c.c @@ -20,7 +20,7 @@ * */ -#include "gps_i2c.h" +#include "modules/gps/gps_i2c.h" #include "mcu_periph/i2c.h" #include "subsystems/gps.h" diff --git a/sw/airborne/modules/gps_i2c/gps_i2c.h b/sw/airborne/modules/gps/gps_i2c.h similarity index 100% rename from sw/airborne/modules/gps_i2c/gps_i2c.h rename to sw/airborne/modules/gps/gps_i2c.h diff --git a/sw/airborne/modules/led_safety_status/led_safety_status.c b/sw/airborne/modules/light/led_safety_status.c similarity index 91% rename from sw/airborne/modules/led_safety_status/led_safety_status.c rename to sw/airborne/modules/light/led_safety_status.c index c034d1e7f8..481b272456 100644 --- a/sw/airborne/modules/led_safety_status/led_safety_status.c +++ b/sw/airborne/modules/light/led_safety_status.c @@ -19,6 +19,13 @@ * Boston, MA 02111-1307, USA. */ +/** + * @file modules/light/led_safety_status.c + * + * Simple module to blink LEDs when battery voltage drops below a certain + * level, radio control is lost or when takeoff safety conditions are not met. + */ + #include "led.h" #include "generated/airframe.h" #include "subsystems/electrical.h" @@ -27,7 +34,7 @@ #include "subsystems/ahrs/ahrs_aligner.h" #include "autopilot_rc_helpers.h" -#include "led_safety_status.h" +#include "modules/light/led_safety_status.h" #ifndef SAFETY_WARNING_LED #error You must define SAFETY_WARNING_LED to use this module! diff --git a/sw/airborne/modules/led_safety_status/led_safety_status.h b/sw/airborne/modules/light/led_safety_status.h similarity index 96% rename from sw/airborne/modules/led_safety_status/led_safety_status.h rename to sw/airborne/modules/light/led_safety_status.h index 8a91183ebf..e18c9ce525 100644 --- a/sw/airborne/modules/led_safety_status/led_safety_status.h +++ b/sw/airborne/modules/light/led_safety_status.h @@ -1,4 +1,3 @@ - /* * Copyright (C) 2012 Pranay Sinha * @@ -21,7 +20,7 @@ */ /** - * @file led_safety_status.h + * @file modules/light/led_safety_status.h * * Simple module to blink LEDs when battery voltage drops below a certain * level, radio control is lost or when takeoff safety conditions are not met. diff --git a/sw/airborne/modules/poles/nav_poles.c b/sw/airborne/modules/nav/nav_poles.c similarity index 52% rename from sw/airborne/modules/poles/nav_poles.c rename to sw/airborne/modules/nav/nav_poles.c index 66d05ac059..8632546283 100644 --- a/sw/airborne/modules/poles/nav_poles.c +++ b/sw/airborne/modules/nav/nav_poles.c @@ -1,4 +1,29 @@ -#include "modules/poles/nav_poles.h" +/* + * Copyright (C) 2009-2015 ENAC + * + * 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, see + * . + */ + +/** + * @file modules/nav/nav_poles.c + * + */ + +#include "modules/nav/nav_poles.h" #include "subsystems/navigation/common_nav.h" uint8_t nav_poles_count = 0; @@ -29,3 +54,4 @@ bool nav_poles_init(uint8_t wp1, uint8_t wp2, return false; } + diff --git a/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h b/sw/airborne/modules/nav/nav_poles.h similarity index 54% rename from sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h rename to sw/airborne/modules/nav/nav_poles.h index 69938f0006..38b2ad794e 100644 --- a/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h +++ b/sw/airborne/modules/nav/nav_poles.h @@ -1,6 +1,5 @@ - /* - * Copyright (C) 2010 Eric Parsonage + * Copyright (C) 2009-2015 ENAC * * This file is part of paparazzi. * @@ -15,20 +14,30 @@ * 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. + * along with paparazzi; see the file COPYING. If not, see + * . */ +/** + * @file modules/nav/nav_poles.h + * + */ -#ifndef DEPLOY_SONAR_BUOY_H -#define DEPLOY_SONAR_BUOY_H +#ifndef NAV_POLES_H +#define NAV_POLES_H +#include #include "std.h" -extern bool_t buoy_1; -extern bool_t buoy_2; -extern void deploy_sonar_buoy_init(void); -extern void deploy_sonar_buoy_periodic(void); +extern uint8_t nav_poles_count; +extern float nav_poles_time; +extern int8_t nav_poles_land; + +bool nav_poles_init(uint8_t wp1, uint8_t wp2, + uint8_t wp1c, uint8_t wp2c, + float radius); + +#define nav_poles_SetLandDir(_d) { if (_d < 0) _d = -1; else _d = 1; } + +#endif -#endif /* DEPLOY_SONAR_BUOY_H */ diff --git a/sw/airborne/modules/poles/nav_poles.h b/sw/airborne/modules/poles/nav_poles.h deleted file mode 100644 index 14ae57a888..0000000000 --- a/sw/airborne/modules/poles/nav_poles.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef NAV_POLS_H -#define NAV_POLS_H - -#include -#include "std.h" - -extern uint8_t nav_poles_count; -extern float nav_poles_time; -extern int8_t nav_poles_land; - -bool nav_poles_init(uint8_t wp1, uint8_t wp2, - uint8_t wp1c, uint8_t wp2c, - float radius); - -#define nav_poles_SetLandDir(_d) { if (_d < 0) _d = -1; else _d = 1; } - -#endif