Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators_dshot.h File Reference
#include "std.h"
#include "modules/actuators/actuators_dshot_arch.h"
+ Include dependency graph for actuators_dshot.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dshot
 

Macros

#define ACTUATORS_DSHOT_OFFSET   48
 In normal DSHOT, first 48 values are special commands this offset allow to use 0 as the no-throttle command This should not be changed unless you know what you are doing. More...
 
#define ACTUATORS_DSHOT_NB   (8+1)
 Maxnum number of DSHOT commands This should be large enough for max applications: 8 motors +1 in case motor count starts at 1 and not 0. More...
 
#define ActuatorDShotSet(_i, _v)
 
#define ActuatorsDShotInit()   actuators_dshot_arch_init()
 
#define ActuatorsDShotCommit()   actuators_dshot_arch_commit()
 

Functions

void actuators_dshot_arch_init (void)
 Arch dependent init. More...
 
void actuators_dshot_arch_commit (void)
 

Variables

struct dshot actuators_dshot_values [ACTUATORS_DSHOT_NB]
 

Detailed Description

Author
Gautier Hattenberger Driver for DSHOT speed controller protocol

Definition in file actuators_dshot.h.


Data Structure Documentation

◆ dshot

struct dshot

Definition at line 49 of file actuators_dshot.h.

Data Fields
bool activated current dshot channel is activated
float cmd command
float current current
float rpm rpm
float voltage motor current

Macro Definition Documentation

◆ ActuatorDShotSet

#define ActuatorDShotSet (   _i,
  _v 
)
Value:
{ \
if (_v == 0) { actuators_dshot_values[_i].cmd = 0; } \
}
float cmd
command
struct dshot actuators_dshot_values[ACTUATORS_DSHOT_NB]
#define ACTUATORS_DSHOT_OFFSET
In normal DSHOT, first 48 values are special commands this offset allow to use 0 as the no-throttle c...

Definition at line 65 of file actuators_dshot.h.

◆ ACTUATORS_DSHOT_NB

#define ACTUATORS_DSHOT_NB   (8+1)

Maxnum number of DSHOT commands This should be large enough for max applications: 8 motors +1 in case motor count starts at 1 and not 0.

Definition at line 46 of file actuators_dshot.h.

◆ ACTUATORS_DSHOT_OFFSET

#define ACTUATORS_DSHOT_OFFSET   48

In normal DSHOT, first 48 values are special commands this offset allow to use 0 as the no-throttle command This should not be changed unless you know what you are doing.

Definition at line 38 of file actuators_dshot.h.

◆ ActuatorsDShotCommit

#define ActuatorsDShotCommit ( )    actuators_dshot_arch_commit()

Definition at line 70 of file actuators_dshot.h.

◆ ActuatorsDShotInit

#define ActuatorsDShotInit ( )    actuators_dshot_arch_init()

Definition at line 69 of file actuators_dshot.h.

Function Documentation

◆ actuators_dshot_arch_commit()

◆ actuators_dshot_arch_init()

void actuators_dshot_arch_init ( void  )

Arch dependent init.

Definition at line 162 of file actuators_dshot_arch.c.

References ACTUATORS_DSHOT_NB, actuators_dshot_private, actuators_dshot_values, CONCAT_GPIO, DefaultPeriodic, dshot_init_struct(), DSHOT_SERVO_0, DSHOT_SERVO_0_AF, DSHOT_SERVO_0_CHANNEL, DSHOT_SERVO_0_DRIVER, DSHOT_SERVO_0_GPIO, DSHOT_SERVO_0_PIN, DSHOT_SERVO_1, DSHOT_SERVO_10, DSHOT_SERVO_10_AF, DSHOT_SERVO_10_CHANNEL, DSHOT_SERVO_10_DRIVER, DSHOT_SERVO_10_GPIO, DSHOT_SERVO_10_PIN, DSHOT_SERVO_1_AF, DSHOT_SERVO_1_CHANNEL, DSHOT_SERVO_1_DRIVER, DSHOT_SERVO_1_GPIO, DSHOT_SERVO_1_PIN, DSHOT_SERVO_2, DSHOT_SERVO_2_AF, DSHOT_SERVO_2_CHANNEL, DSHOT_SERVO_2_DRIVER, DSHOT_SERVO_2_GPIO, DSHOT_SERVO_2_PIN, DSHOT_SERVO_3, DSHOT_SERVO_3_AF, DSHOT_SERVO_3_CHANNEL, DSHOT_SERVO_3_DRIVER, DSHOT_SERVO_3_GPIO, DSHOT_SERVO_3_PIN, DSHOT_SERVO_4, DSHOT_SERVO_4_AF, DSHOT_SERVO_4_CHANNEL, DSHOT_SERVO_4_DRIVER, DSHOT_SERVO_4_GPIO, DSHOT_SERVO_4_PIN, DSHOT_SERVO_5, DSHOT_SERVO_5_AF, DSHOT_SERVO_5_CHANNEL, DSHOT_SERVO_5_DRIVER, DSHOT_SERVO_5_GPIO, DSHOT_SERVO_5_PIN, DSHOT_SERVO_7, DSHOT_SERVO_7_AF, DSHOT_SERVO_7_CHANNEL, DSHOT_SERVO_7_DRIVER, DSHOT_SERVO_7_GPIO, DSHOT_SERVO_7_PIN, DSHOT_SERVO_8, DSHOT_SERVO_8_AF, DSHOT_SERVO_8_CHANNEL, DSHOT_SERVO_8_DRIVER, DSHOT_SERVO_8_GPIO, DSHOT_SERVO_8_PIN, DSHOT_SERVO_9, DSHOT_SERVO_9_AF, DSHOT_SERVO_9_CHANNEL, DSHOT_SERVO_9_DRIVER, DSHOT_SERVO_9_GPIO, DSHOT_SERVO_9_PIN, dshot_set_struct(), dshotStart(), esc_msg_send(), FALSE, gpio_setup_pin_af(), gpio_setup_pin_af_pullup(), PRINT_CONFIG_VAR(), and register_periodic_telemetry().

+ Here is the call graph for this function:

Variable Documentation

◆ actuators_dshot_values

struct dshot actuators_dshot_values[ACTUATORS_DSHOT_NB]
extern