Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprzlink_cam_ctrl.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 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
26#include "generated/airframe.h"
27#include "generated/modules.h"
28
29// Include Standard Camera Control Interface
30#include "dc.h"
31
36
38{
39 // Common DC Periodic task
41}
42
43/* Command The Camera */
45{
46
47 if (cmd == DC_SHOOT) {
49 }
50
51 // call command send_command function
53}
54
57
58void dc_set_expo(float expo)
59{
61 uint8_t tab[2];
62 tab[0] = 'e';
63 tab[1] = (uint8_t)(expo * 10.f);
64 uint8_t dst_id = 0;
66}
67
68void dc_expo_cb(uint8_t* buf) {
69 if (DL_PAYLOAD_COMMAND_ac_id(buf) != AC_ID) { return; }
70
71 // feedback from camera
72 if (DL_PAYLOAD_COMMAND_command_length(buf) == 2 && DL_PAYLOAD_COMMAND_command(buf)[0] == 'e') {
74 }
75}
76
void dc_periodic(void)
periodic function
Definition dc.c:279
void dc_send_command_common(uint8_t cmd)
Command sending function.
Definition dc.c:192
void dc_send_shot_position(void)
Send Down the coordinates of where the photo was taken.
Definition dc.c:153
float dc_exposure
camera exposure
Definition dc.c:72
Standard Digital Camera Control Interface.
@ DC_SHOOT
Definition dc.h:102
struct pprz_transport extra_pprz_tp
Extra datalink and telemetry using PPRZ protocol.
uint16_t foo
Definition main_demo5.c:58
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.