Autodrone
Multi-Domain Vehicle
motors.h File Reference

This file contains functions to initialize the ESC or change modes. More...

Go to the source code of this file.

Macros

#define MOTOR_COUNT   4
 

Enumerations

enum  motors_e { MOTOR1 , MOTOR2 , MOTOR3 , MOTOR4 }
 
enum  motors_mode_e { MOTORS_MODE_NORMAL , MOTORS_MODE_3D }
 
enum  motors_grouped_e {
  MOTORS_NONE , MOTORS_1 , MOTORS_2 , MOTORS_12 ,
  MOTORS_3 , MOTORS_13 , MOTORS_23 , MOTORS_123 ,
  MOTORS_4 , MOTORS_14 , MOTORS_24 , MOTORS_124 ,
  MOTORS_34 , MOTORS_134 , MOTORS_234 , MOTORS_1234
}
 
enum  motors_beeps_e {
  BEEP1 = 1 , BEEP2 , BEEP3 , BEEP4 ,
  BEEP5
}
 

Functions

void motorInit (void)
 Sets motor_value to 0 for all motors. More...
 
void motors3dOn (void)
 Changes motor mode to 3D. More...
 
void motors3dOff (void)
 Changes motor mode to 3D. More...
 
void motorsSettingsSave (void)
 
void motorsChangeMode (dshotCommands_e command, motors_grouped_e motors)
 
void motorsBeep (motors_beeps_e beep)
 

Variables

uint16_t motor_value [MOTOR_COUNT]
 
semaphore_t motor_initialized
 
motors_mode_e motors_mode
 

Detailed Description

This file contains functions to initialize the ESC or change modes.

Author
Jeremy Wolfe
Date
03 MAR 2022

Macro Definition Documentation

◆ MOTOR_COUNT

#define MOTOR_COUNT   4

Enumeration Type Documentation

◆ motors_beeps_e

Enumerator
BEEP1 
BEEP2 
BEEP3 
BEEP4 
BEEP5 

◆ motors_e

enum motors_e
Enumerator
MOTOR1 
MOTOR2 
MOTOR3 
MOTOR4 

◆ motors_grouped_e

Enumerator
MOTORS_NONE 
MOTORS_1 
MOTORS_2 
MOTORS_12 
MOTORS_3 
MOTORS_13 
MOTORS_23 
MOTORS_123 
MOTORS_4 
MOTORS_14 
MOTORS_24 
MOTORS_124 
MOTORS_34 
MOTORS_134 
MOTORS_234 
MOTORS_1234 

◆ motors_mode_e

Enumerator
MOTORS_MODE_NORMAL 
MOTORS_MODE_3D 

Function Documentation

◆ motorInit()

void motorInit ( void  )

Sets motor_value to 0 for all motors.

Returns
Void.

◆ motors3dOff()

void motors3dOff ( void  )

Changes motor mode to 3D.

Returns
Void.

◆ motors3dOn()

void motors3dOn ( void  )

Changes motor mode to 3D.

Returns
Void.

◆ motorsBeep()

void motorsBeep ( motors_beeps_e  beep)

◆ motorsChangeMode()

void motorsChangeMode ( dshotCommands_e  command,
motors_grouped_e  motors 
)

◆ motorsSettingsSave()

void motorsSettingsSave ( void  )

Variable Documentation

◆ motor_initialized

semaphore_t motor_initialized
extern

◆ motor_value

uint16_t motor_value[MOTOR_COUNT]
extern

◆ motors_mode

motors_mode_e motors_mode
extern