Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
actuators_asctec.h File Reference
#include "mcu_periph/i2c.h"
#include "generated/airframe.h"
+ Include dependency graph for actuators_asctec.h:
+ This graph shows which files directly or indirectly include this file:

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
 

Detailed Description

Actuators driver for Asctec motor controllers.

Definition in file actuators_asctec.h.


Data Structure Documentation

◆ ActuatorsAsctec

struct ActuatorsAsctec

Definition at line 53 of file actuators_asctec.h.

+ Collaboration diagram for ActuatorsAsctec:
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

Macro Definition Documentation

◆ ActuatorAsctecSet

#define ActuatorAsctecSet (   _i,
  _v 
)    { actuators_asctec.cmds[_i] = _v; }

Definition at line 80 of file actuators_asctec.h.

◆ actuators_asctec_SetCommand

#define actuators_asctec_SetCommand (   _v)
Value:
{ \
actuators_asctec.cmd = _v; \
}

Definition at line 65 of file actuators_asctec.h.

◆ actuators_asctec_SetCurAddr

#define actuators_asctec_SetCurAddr (   _v)
Value:
{ \
actuators_asctec.cur_addr = _v; \
}

Definition at line 73 of file actuators_asctec.h.

◆ actuators_asctec_SetNewAddr

#define actuators_asctec_SetNewAddr (   _v)
Value:
{ \
actuators_asctec.new_addr = _v; \
}

Definition at line 69 of file actuators_asctec.h.

◆ ActuatorsAsctecCommit

#define ActuatorsAsctecCommit ( )    actuators_asctec_set(autopilot_get_motors_on())

Definition at line 82 of file actuators_asctec.h.

◆ ActuatorsAsctecInit

#define ActuatorsAsctecInit ( )    actuators_asctec_init()

Definition at line 81 of file actuators_asctec.h.

Enumeration Type Documentation

◆ actuators_asctec_addr

Enumerator
FRONT 
BACK 
LEFT 
RIGHT 

Definition at line 39 of file actuators_asctec.h.

◆ actuators_asctec_cmd

Enumerator
NONE 
TEST 
REVERSE 
SET_ADDR 

Definition at line 33 of file actuators_asctec.h.

◆ actuators_asctec_cmds

Enumerator
PITCH 
ROLL 
YAW 
THRUST 
CMD_NB 

Definition at line 46 of file actuators_asctec.h.

Function Documentation

◆ actuators_asctec_init()

◆ actuators_asctec_set()

Variable Documentation

◆ actuators_asctec

struct ActuatorsAsctec actuators_asctec

Definition at line 42 of file actuators_asctec.c.

Referenced by actuators_asctec_init(), and actuators_asctec_set().