Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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;
42  struct i2c_transaction trans_cmd;
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 
uint8_t bat
batterie voltage (in decivolt)
struct i2c_transaction trans_sensors
i2c struct for sensors
void actuators_md25_init(void)
uint8_t current[2]
current in motors (in deciamp)
uint8_t mode
control mode
bool initialized
init flag
uint8_t accel_rate
accel rate (from 1 to 10)
void actuators_md25_periodic(void)
struct i2c_transaction trans_cmd
i2c struct for command
uint8_t cmds[2]
commands
void actuators_md25_set(void)
int32_t encoders[2]
encoder values
struct ActuatorsMD25 actuators_md25
void actuators_md25_event(void)
I2C transaction structure.
Definition: i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98