Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
actuators_xvert.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) Kevin van Hecke
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
*/
26
#ifndef ACTUATORS_XVERT_H
27
#define ACTUATORS_XVERT_H
28
29
#include "subsystems/actuators/actuators_pwm_arch.h"
30
31
#define ESCS_START_BYTE 0xFE
32
#define ESCS_DATA_FLIPBIT 16384
33
#define ESCS_DATA_MYSTERYBIT 32768
34
35
struct
EscData
{
36
unsigned
char
start
;
//0xfe
37
unsigned
char
len
;
//8
38
unsigned
char
id
;
//2
39
40
//1200 - 1800, maybe 1100-1900
41
//1160 = off, max ~1880
42
//in both data ints, 2e byte toggles the 64 bit (15e bit in total). If on, its the first, if off its the other
43
//in d2 16e bit always on
44
45
uint32_t
d1
;
46
uint32_t
d2
;
47
unsigned
char
crc
;
48
} __attribute__((__packed__));
49
50
51
extern
int32_t
actuators_xvert_values
[
ACTUATORS_PWM_NB
];
52
extern
void
actuators_xvert_commit
(
void
);
53
extern
void
actuators_xvert_init
(
void
);
54
55
#define ActuatorsXvertInit actuators_xvert_init
56
#define ActuatorXvertSet(_i, _v) { actuators_xvert_values[_i] = _v; }
57
#define ActuatorsXvertCommit actuators_xvert_commit
58
59
60
61
#endif
actuators_xvert_init
void actuators_xvert_init(void)
Definition:
actuators_xvert.c:84
EscData::len
unsigned char len
Definition:
actuators_xvert.h:37
actuators_xvert_values
int32_t actuators_xvert_values[ACTUATORS_PWM_NB]
Definition:
actuators_xvert.c:37
EscData::d2
uint32_t d2
Definition:
actuators_xvert.h:46
EscData::d1
uint32_t d1
Definition:
actuators_xvert.h:45
uint32_t
unsigned long uint32_t
Definition:
types.h:18
ACTUATORS_PWM_NB
#define ACTUATORS_PWM_NB
Definition:
actuators_pwm_arch.h:42
int32_t
signed long int32_t
Definition:
types.h:19
EscData
Definition:
actuators_xvert.h:35
EscData::crc
unsigned char crc
Definition:
actuators_xvert.h:47
EscData::start
unsigned char start
Definition:
actuators_xvert.h:36
EscData::id
unsigned char id
Definition:
actuators_xvert.h:38
actuators_xvert_commit
void actuators_xvert_commit(void)
Definition:
actuators_xvert.c:91
sw
airborne
arch
chibios
subsystems
actuators
actuators_xvert.h
Generated on Wed Feb 10 2021 04:33:53 for Paparazzi UAS by
1.8.8