Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 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 
47  unsigned char crc;
48 } __attribute__((__packed__));
49 
50 
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
void actuators_xvert_init(void)
unsigned char len
int32_t actuators_xvert_values[ACTUATORS_PWM_NB]
uint32_t d2
uint32_t d1
unsigned long uint32_t
Definition: types.h:18
#define ACTUATORS_PWM_NB
signed long int32_t
Definition: types.h:19
unsigned char crc
unsigned char start
unsigned char id
void actuators_xvert_commit(void)