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
actuators_md25.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 
27 #ifndef ACTUATORS_MD25_H
28 #define ACTUATORS_MD25_H
29 
30 #include "std.h"
31 #include "mcu_periph/i2c.h"
32 
33 /* Main actuator structure */
34 struct ActuatorsMD25 {
41  bool initialized;
44 };
45 
46 extern struct ActuatorsMD25 actuators_md25;
47 
48 extern void actuators_md25_init(void);
49 extern void actuators_md25_periodic(void);
50 extern void actuators_md25_event(void);
51 extern void actuators_md25_set(void);
52 
53 /* Actuator macros */
54 #define ActuatorMD25Set(_i, _v) { actuators_md25.cmds[_i] = _v; }
55 #define ActuatorsMD25Init() actuators_md25_init()
56 #define ActuatorsMD25Commit() actuators_md25_set()
57 
58 #endif
59 
int32_t encoders[2]
encoder values
void actuators_md25_periodic(void)
void actuators_md25_event(void)
void actuators_md25_set(void)
struct i2c_transaction trans_sensors
i2c struct for sensors
void actuators_md25_init(void)
uint8_t accel_rate
accel rate (from 1 to 10)
uint8_t mode
control mode
struct ActuatorsMD25 actuators_md25
I2C transaction structure.
Definition: i2c.h:93
signed long int32_t
Definition: types.h:19
unsigned char uint8_t
Definition: types.h:14
uint8_t cmds[2]
commands
uint8_t bat
batterie voltage (in decivolt)
struct i2c_transaction trans_cmd
i2c struct for command
bool initialized
init flag
uint8_t current[2]
current in motors (in deciamp)
Architecture independent I2C (Inter-Integrated Circuit Bus) API.