Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
crtp.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 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
29
#ifndef CRTP_H
30
#define CRTP_H
31
32
#include "
std.h
"
33
34
#define CRTP_PORT_CONSOLE 0x00
35
#define CRTP_PORT_PARAM 0x02
36
#define CRTP_PORT_COMMANDER 0x03
37
#define CRTP_PORT_MEM 0x04
38
#define CRTP_PORT_LOG 0x05
39
40
#define CRTP_PORT_PPRZLINK 0x09 // Non-standard port for transmitting pprzlink messages
41
42
#define CRTP_PORT_PLATFORM 0x0D
43
#define CRTP_PORT_DEBUG 0x0E
44
#define CRTP_PORT_LINK 0x0F
45
46
#define CRTP_NULL(x) (((x).header & 0xf3) == 0xf3)
47
48
// 1 byte header + 31 bytes data = 32 (max ESB packet size)
49
// With the NRF51, this could be increased to ~250, but the Crazyradio PA uses a NRF24 which can't do this
50
#define CRTP_MAX_DATA_SIZE 31
51
52
typedef
struct
{
53
uint8_t
size
;
// Total size of this message, including the header (placed here to overlap with syslink length field)
54
union
{
55
uint8_t
header;
56
struct
{
57
uint8_t
channel
: 2;
58
uint8_t
link : 2;
59
uint8_t
port : 4;
60
};
61
};
62
63
uint8_t
data[
CRTP_MAX_DATA_SIZE
];
64
} __attribute__((packed))
crtp_message_t
;
65
66
67
typedef
struct
{
68
float
roll
;
// -20 to 20
69
float
pitch
;
70
float
yaw
;
// -150 to 150
71
uint16_t
thrust
;
72
}
crtp_commander
;
73
74
#endif
75
uint16_t
unsigned short uint16_t
Definition:
types.h:16
channel
static uint8_t channel
Definition:
ADS8344.c:80
crtp_commander::roll
float roll
Definition:
crtp.h:68
crtp_message_t::size
uint8_t size
Definition:
crtp.h:53
crtp_commander::pitch
float pitch
Definition:
crtp.h:69
crtp_commander::thrust
uint16_t thrust
Definition:
crtp.h:71
std.h
crtp_commander
Definition:
crtp.h:67
crtp_message_t
Definition:
crtp.h:52
uint8_t
unsigned char uint8_t
Definition:
types.h:14
CRTP_MAX_DATA_SIZE
#define CRTP_MAX_DATA_SIZE
Definition:
crtp.h:50
crtp_commander::yaw
float yaw
Definition:
crtp.h:70
sw
airborne
modules
datalink
bitcraze
crtp.h
Generated on Tue Feb 1 2022 13:51:15 for Paparazzi UAS by
1.8.17