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
extra_pprz_dl.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006 Pascal Brisset, Antoine Drouin
3  * Copyright (C) 2010 ENAC
4  * Copyright (C) 2016 2016 Michal Podhradsky <http://github.com/podhrmic>
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
44 #define PERIODIC_C_EXTRA
45 
48 
50 uint8_t extra_dl_buffer[MSG_SIZE] __attribute__((aligned));
51 
52 struct pprz_transport extra_pprz_tp;
53 
55 {
56  pprz_transport_init(&extra_pprz_tp);
57 }
58 
59 
61 {
62  pprz_check_and_parse(&EXTRA_DOWNLINK_DEVICE.device, &extra_pprz_tp, extra_dl_buffer, &extra_dl_msg_available);
63  DlCheckAndParse(&EXTRA_DOWNLINK_DEVICE.device, &extra_pprz_tp.trans_tx, extra_dl_buffer, &extra_dl_msg_available);
64 }
65 
66 
68 {
69 #if PERIODIC_TELEMETRY && defined(TELEMETRY_PROCESS_Extra)
70  // send periodic messages as defined in the Extra process, we are using DefaultPeriodic so we can send standard messages
71  periodic_telemetry_send_Extra(DefaultPeriodic, &extra_pprz_tp.trans_tx, &(EXTRA_DOWNLINK_DEVICE).device);
72 #endif
73 }
Extra datalink and telemetry using PPRZ protocol.
Periodic telemetry system header (includes downlink utility and generated code).
bool extra_dl_msg_available
Definition: extra_pprz_dl.c:49
#define MSG_SIZE
Definition: main_demo5.c:63
void extra_pprz_dl_event(void)
Datalink Event.
Definition: extra_pprz_dl.c:60
struct pprz_transport extra_pprz_tp
Definition: extra_pprz_dl.c:52
#define DefaultPeriodic
Set default periodic telemetry.
Definition: telemetry.h:66
uint8_t extra_dl_buffer[MSG_SIZE]
Definition: extra_pprz_dl.c:50
unsigned char uint8_t
Definition: types.h:14
void extra_pprz_dl_periodic(void)
Periodic function.
Definition: extra_pprz_dl.c:67
void extra_pprz_dl_init(void)
Init function.
Definition: extra_pprz_dl.c:54