Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
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"
28
30#define UART1_DEV /dev/ttyPA1
31
33#ifndef GPX_UBX_UCENTER_ENABLE_NMEA
34#define GPX_UBX_UCENTER_ENABLE_NMEA TRUE
35#endif
36
40#ifndef UART2_DEV
41#define UART2_DEV /dev/ttyUSB0
42#endif
43#ifndef UART4_DEV
44#define UART4_DEV /dev/ttyUSB1
45#endif
46#ifndef UART5_DEV
47#define UART5_DEV /dev/ttyACM0
48#endif
49#ifndef UART6_DEV
50#define UART6_DEV /dev/ttyACM1
51#endif
52
54#ifndef UART3_DEV
55#define UART3_DEV /dev/uart-sbus
56#endif
57
58/* Default actuators driver */
59#define DEFAULT_ACTUATORS "boards/disco/actuators.h"
60#define ActuatorDefaultSet ActuatorsDiscoSet
61#define ActuatorsDefaultInit() ActuatorsDiscoInit()
62#define ActuatorsDefaultCommit() ActuatorsDiscoCommit()
63
64/* Cameras */
66
67// re-use the Parrot Bebop video drivers
70
71extern struct video_config_t bottom_camera;
72extern struct video_config_t front_camera;
73
74/* ISP */
75//struct mt9f002_t mt9f002;
76
77/* by default baro module is used */
78#ifndef USE_BARO_BOARD
79#define USE_BARO_BOARD 0
80#endif
81
82/* The ADC from the sonar */
83#if USE_ADC0
84#define ADC0_ID 0
85#define ADC0_CHANNELS 2
86#define ADC0_CHANNELS_CNT 1
87#define ADC0_BUF_LENGTH 8192
88#endif
89
90/* The SPI from the sonar */
91#if USE_SPI0
92#define SPI0_MODE 0
93#define SPI0_BITS_PER_WORD 8
94#define SPI0_MAX_SPEED_HZ 320000
95#endif
96
97/* Configuration values of airspeed sensor onboard the Parrot Disco C.H.U.C.K */
98#define MS45XX_I2C_DEV i2c1
99#define MS45XX_PRESSURE_RANGE 4
100#define MS45XX_PRESSURE_TYPE 1
101#define MS45XX_OUTPUT_TYPE 1
102#define MS45XX_PRESSURE_OUTPUT_TYPE_InH2O 1
103#ifndef USE_AIRSPEED_LOWPASS_FILTER
104#define USE_AIRSPEED_LOWPASS_FILTER 1
105#endif
106//#if USE_AIRSPEED_LOWPASS_FILTER /* Always used now */
107#ifndef MS45XX_LOWPASS_TAU
108#define MS45XX_LOWPASS_TAU 0.15
109#endif
110//#endif
111
112/* To be flexible and be able to disable use of airspeed in state this could have been in the airframe file ofcourse
113 * but most users just want to have perfectly flying Disco, so enable per default... */
114#ifndef USE_AIRSPEED
115#define USE_AIRSPEED 1
116#endif
117
118/* These are the default Disco values for sonar */
119#define SONAR_BEBOP_TRANSITION_HIGH_TO_LOW 0.75 //m
120#define SONAR_BEBOP_TRANSITION_LOW_TO_HIGH 1.5 //m
121#define SONAR_BEBOP_TRANSITION_COUNT 50
122#define SONAR_BEBOP_PEAK_THRESHOLD 50
123
124#endif /* CONFIG_DISCO */
struct video_config_t front_camera
Video thread dummy for simulation.
Definition board.c:43
struct video_config_t bottom_camera
Definition board.c:68
Initialization and configuration of the MT9F002 CMOS Chip.
Initialization and configuration of the MT9V117 CMOS Chip.
V4L2 device settings.