Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
board.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 The Paparazzi Team
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 
28 #include <stdlib.h>
29 #include "mcu.h"
30 
31 /* check if the bat_voltage_ardrone2 module is loaded */
32 #include "generated/modules.h"
33 #ifndef BAT_VOLTAGE_ARDRONE2_PERIODIC_FREQ
34 #warning No battery voltage measurement available! Please add <load name="bat_voltage_ardrone2.xml"/> to your modules.
35 #endif
36 
38 
40  .w = 1280,
41  .h = 720,
42  .dev_name = "/dev/video1",
43  .subdev_name = NULL,
44  .format = V4L2_PIX_FMT_UYVY,
45  .buf_cnt = 10,
46  .filters = 0
47 };
48 
50  .w = 320,
51  .h = 240,
52  .dev_name = "/dev/video2",
53  .subdev_name = NULL,
54  .format = V4L2_PIX_FMT_UYVY,
55  .buf_cnt = 10,
56  .filters = 0
57 };
58 
59 
60 void board_init(void)
61 {
62  // First we try to kill the program.elf and its respawner if it is running
63  int ret = system("killall -9 program.elf.respawner.sh; killall -9 program.elf");
64  (void) ret;
65 }
int w
Width.
Definition: video_device.h:38
void board_init(void)
Optional board init function called at the end of mcu_init().
Definition: board.c:60
Arch independent mcu ( Micro Controller Unit ) utilities.
struct video_config_t bottom_camera
Definition: board.c:49
v4l2 video device settings interface Works on Linux platforms
struct video_config_t front_camera
Definition: board.c:39
V4L2 device settings.
Definition: video_device.h:37