Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Actuators driver for Asctec motor controllers. More...
Go to the source code of this file.
Data Structures | |
struct | ActuatorsAsctec |
Macros | |
#define | actuators_asctec_SetCommand(_v) |
#define | actuators_asctec_SetNewAddr(_v) |
#define | actuators_asctec_SetCurAddr(_v) |
#define | ActuatorAsctecSet(_i, _v) { actuators_asctec.cmds[_i] = _v; } |
#define | ActuatorsAsctecInit() actuators_asctec_init() |
#define | ActuatorsAsctecCommit() actuators_asctec_set(autopilot_get_motors_on()) |
Enumerations | |
enum | actuators_asctec_cmd { NONE, TEST, REVERSE, SET_ADDR } |
enum | actuators_asctec_addr { FRONT, BACK, LEFT, RIGHT } |
enum | actuators_asctec_cmds { PITCH, ROLL, YAW, THRUST, CMD_NB } |
Functions | |
void | actuators_asctec_init (void) |
void | actuators_asctec_set (bool motors_on) |
Variables | |
struct ActuatorsAsctec | actuators_asctec |
Actuators driver for Asctec motor controllers.
Definition in file actuators_asctec.h.
struct ActuatorsAsctec |
Definition at line 53 of file actuators_asctec.h.
Data Fields | ||
---|---|---|
enum actuators_asctec_cmd | cmd | |
int32_t | cmds[CMD_NB] | |
enum actuators_asctec_addr | cur_addr | |
struct i2c_transaction | i2c_trans | |
volatile uint32_t | nb_err | |
enum actuators_asctec_addr | new_addr |
#define ActuatorAsctecSet | ( | _i, | |
_v | |||
) | { actuators_asctec.cmds[_i] = _v; } |
Definition at line 80 of file actuators_asctec.h.
#define actuators_asctec_SetCommand | ( | _v | ) |
Definition at line 65 of file actuators_asctec.h.
#define actuators_asctec_SetCurAddr | ( | _v | ) |
Definition at line 73 of file actuators_asctec.h.
#define actuators_asctec_SetNewAddr | ( | _v | ) |
Definition at line 69 of file actuators_asctec.h.
#define ActuatorsAsctecCommit | ( | ) | actuators_asctec_set(autopilot_get_motors_on()) |
Definition at line 82 of file actuators_asctec.h.
#define ActuatorsAsctecInit | ( | ) | actuators_asctec_init() |
Definition at line 81 of file actuators_asctec.h.
Enumerator | |
---|---|
FRONT | |
BACK | |
LEFT | |
RIGHT |
Definition at line 39 of file actuators_asctec.h.
enum actuators_asctec_cmd |
Enumerator | |
---|---|
NONE | |
TEST | |
REVERSE | |
SET_ADDR |
Definition at line 33 of file actuators_asctec.h.
Enumerator | |
---|---|
PITCH | |
ROLL | |
YAW | |
THRUST | |
CMD_NB |
Definition at line 46 of file actuators_asctec.h.
void actuators_asctec_init | ( | void | ) |
Definition at line 44 of file actuators_asctec.c.
References ACTUATORS_ASCTEC_SLAVE_ADDR, ActuatorsAsctec::cmd, ActuatorsAsctec::cur_addr, FRONT, ActuatorsAsctec::i2c_trans, I2CTransSuccess, I2CTransTx, i2c_transaction::len_w, ActuatorsAsctec::nb_err, ActuatorsAsctec::new_addr, NONE, i2c_transaction::slave_addr, i2c_transaction::status, and i2c_transaction::type.
void actuators_asctec_set | ( | bool | motors_on | ) |
Definition at line 56 of file actuators_asctec.c.
References actuators_asctec, ACTUATORS_ASCTEC_SLAVE_ADDR, ASCTEC_MAX_CMD, ASCTEC_MAX_THROTTLE, ASCTEC_MIN_CMD, ASCTEC_MIN_THROTTLE, i2c_transaction::buf, ActuatorsAsctec::cmd, ActuatorsAsctec::cmds, ActuatorsAsctec::cur_addr, ActuatorsAsctec::i2c_trans, i2c_transmit(), I2CTransDone, I2CTransFailed, I2CTransSuccess, ActuatorsAsctec::nb_err, ActuatorsAsctec::new_addr, NONE, PITCH, REVERSE, ROLL, SET_ADDR, i2c_transaction::status, SysTimeTimer, TEST, THRUST, USEC_OF_SEC, and YAW.
struct ActuatorsAsctec actuators_asctec |
Definition at line 42 of file actuators_asctec.c.
Referenced by actuators_asctec_set().