Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
disco.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef CONFIG_DISCO
23 #define CONFIG_DISCO
24 
25 #define BOARD_DISCO
26 
27 #include "std.h"
29 // re-use the Parrot Bebop video drivers
30 #include "boards/bebop/mt9v117.h"
31 #include "boards/bebop/mt9f002.h"
32 
33 
35 #define UART1_DEV /dev/ttyPA1
36 
37 #define GPS_UBX_ENABLE_NMEA_DATA_MASK 0xff
38 
42 #ifndef UART2_DEV
43 #define UART2_DEV /dev/ttyUSB0
44 #endif
45 #ifndef UART4_DEV
46 #define UART4_DEV /dev/ttyUSB1
47 #endif
48 #ifndef UART5_DEV
49 #define UART5_DEV /dev/ttyACM0
50 #endif
51 #ifndef UART6_DEV
52 #define UART6_DEV /dev/ttyACM1
53 #endif
54 
56 #ifndef UART3_DEV
57 #define UART3_DEV /dev/uart-sbus
58 #endif
59 
60 /* Default actuators driver */
61 #define DEFAULT_ACTUATORS "boards/disco/actuators.h"
62 #define ActuatorDefaultSet(_x,_y) ActuatorsDiscoSet(_x,_y)
63 #define ActuatorsDefaultInit() ActuatorsDiscoInit()
64 #define ActuatorsDefaultCommit() ActuatorsDiscoCommit()
65 
66 /* Cameras */
67 extern struct video_config_t bottom_camera;
68 extern struct video_config_t front_camera;
69 
70 /* ISP */
72 
73 /* by default activate onboard baro */
74 #ifndef USE_BARO_BOARD
75 #define USE_BARO_BOARD 1
76 #endif
77 
78 /* The ADC from the sonar */
79 #if USE_ADC0
80 #define ADC0_ID 0
81 #define ADC0_CHANNELS 2
82 #define ADC0_CHANNELS_CNT 1
83 #define ADC0_BUF_LENGTH 8192
84 #endif
85 
86 /* The SPI from the sonar */
87 #if USE_SPI0
88 #define SPI0_MODE 0
89 #define SPI0_BITS_PER_WORD 8
90 #define SPI0_MAX_SPEED_HZ 320000
91 #endif
92 
93 /* Configuration values of airspeed sensor onboard the Parrot Disco C.H.U.C.K */
94 #define MS45XX_I2C_DEV i2c1
95 #define MS45XX_PRESSURE_RANGE 4
96 #define MS45XX_PRESSURE_TYPE 1
97 #define MS45XX_OUTPUT_TYPE 1
98 #define MS45XX_PRESSURE_OUTPUT_TYPE_InH2O 1
99 #define MS45XX_AIRSPEED_SCALE 1.6327
100 #ifndef USE_AIRSPEED_LOWPASS_FILTER
101 #define USE_AIRSPEED_LOWPASS_FILTER 1
102 #endif
103 //#if USE_AIRSPEED_LOWPASS_FILTER
104 #ifndef MS45XX_LOWPASS_TAU
105 #define MS45XX_LOWPASS_TAU 0.15
106 #endif
107 //#endif
108 
109 /* To be flexible and be able to disable use of airspeed in state this could have been in the airframe file ofcourse
110  * but most users just want to have perfectly flying Disco, so enable per default... */
111 #ifndef USE_AIRSPEED
112 #define USE_AIRSPEED 1
113 #endif
114 
115 #endif /* CONFIG_DISCO */
Initialization and configuration of the MT9V117 CMOS Chip.
struct video_config_t bottom_camera
Definition: board.c:68
Initialization and configuration of the MT9F002 CMOS Chip.
struct mt9f002_t mt9f002
Definition: disco.h:71
struct video_config_t front_camera
Video thread dummy for simulation.
Definition: board.c:43
V4L2 device settings.
Definition: video_device.h:55