ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
motors.c File Reference
#include "motors.h"
Include dependency graph for motors.c:

Go to the source code of this file.

Functions

void motors_init (void)
 
void motors_arm (uint8_t armed)
 disarmed: duty forced to 0

 
void motors_set (const float duty[4])
 0..1, saturated

 
void motors_test (uint8_t motor, float duty)
 MOTOR_TEST (props off, disarmed): motor 1..4 at duty, the others off; motor 0 = all off.
 

Variables

static volatile uint8_t s_armed
 

Function Documentation

◆ motors_init()

void motors_init ( void  )

Definition at line 13 of file motors.c.

References s_armed.

Referenced by app_start().

Here is the caller graph for this function:

◆ motors_arm()

void motors_arm ( uint8_t  armed)

disarmed: duty forced to 0

Definition at line 24 of file motors.c.

References motors_set(), and s_armed.

Referenced by app_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ motors_set()

void motors_set ( const float  duty[4])

0..1, saturated

Definition at line 30 of file motors.c.

References MOTORS_PWM_TOP, and s_armed.

Referenced by motors_arm().

Here is the caller graph for this function:

◆ motors_test()

void motors_test ( uint8_t  motor,
float  duty 
)

MOTOR_TEST (props off, disarmed): motor 1..4 at duty, the others off; motor 0 = all off.

Does nothing with MOTORS_ENABLE = 0.

Definition at line 44 of file motors.c.

References MOTORS_PWM_TOP, and s_armed.

Referenced by motor_test_hook().

Here is the caller graph for this function:

Variable Documentation

◆ s_armed

volatile uint8_t s_armed
static

Definition at line 11 of file motors.c.

Referenced by motors_arm(), motors_init(), motors_set(), and motors_test().