Paparazzi UAS v7.0_unstable
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 */
45
46extern struct ActuatorsMD25 actuators_md25;
47
48extern void actuators_md25_init(void);
49extern void actuators_md25_periodic(void);
50extern void actuators_md25_event(void);
51extern 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.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.