Paparazzi UAS
v5.18.0_stable
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
{
35
uint8_t
cmds
[2];
36
int32_t
encoders
[2];
37
uint8_t
bat
;
38
uint8_t
current
[2];
39
uint8_t
mode
;
40
uint8_t
accel_rate
;
41
bool
initialized
;
42
struct
i2c_transaction
trans_cmd
;
43
struct
i2c_transaction
trans_sensors
;
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
ActuatorsMD25::trans_cmd
struct i2c_transaction trans_cmd
i2c struct for command
Definition:
actuators_md25.h:42
actuators_md25
struct ActuatorsMD25 actuators_md25
Definition:
actuators_md25.c:73
actuators_md25_set
void actuators_md25_set(void)
Definition:
actuators_md25.c:108
actuators_md25_init
void actuators_md25_init(void)
Definition:
actuators_md25.c:75
ActuatorsMD25::initialized
bool initialized
init flag
Definition:
actuators_md25.h:41
std.h
ActuatorsMD25::current
uint8_t current[2]
current in motors (in deciamp)
Definition:
actuators_md25.h:38
ActuatorsMD25::encoders
int32_t encoders[2]
encoder values
Definition:
actuators_md25.h:36
uint8_t
unsigned char uint8_t
Definition:
types.h:14
ActuatorsMD25
Definition:
actuators_md25.h:34
actuators_md25_event
void actuators_md25_event(void)
Definition:
actuators_md25.c:120
ActuatorsMD25::bat
uint8_t bat
batterie voltage (in decivolt)
Definition:
actuators_md25.h:37
i2c_transaction
I2C transaction structure.
Definition:
i2c.h:93
ActuatorsMD25::trans_sensors
struct i2c_transaction trans_sensors
i2c struct for sensors
Definition:
actuators_md25.h:43
int32_t
signed long int32_t
Definition:
types.h:19
actuators_md25_periodic
void actuators_md25_periodic(void)
Definition:
actuators_md25.c:90
ActuatorsMD25::mode
uint8_t mode
control mode
Definition:
actuators_md25.h:39
ActuatorsMD25::accel_rate
uint8_t accel_rate
accel rate (from 1 to 10)
Definition:
actuators_md25.h:40
i2c.h
ActuatorsMD25::cmds
uint8_t cmds[2]
commands
Definition:
actuators_md25.h:35
sw
airborne
modules
actuators
actuators_md25.h
Generated on Tue Feb 1 2022 13:51:14 for Paparazzi UAS by
1.8.17