Paparazzi UAS  v5.15_devel-113-g1b57ff1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
esc32.h File Reference
#include "std.h"
+ Include dependency graph for esc32.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  esc32_parameter
 
struct  esc32
 

Enumerations

enum  binaryCommands {
  BINARY_COMMAND_NOP = 0, BINARY_COMMAND_ARM, BINARY_COMMAND_CLI, BINARY_COMMAND_CONFIG,
  BINARY_COMMAND_DISARM, BINARY_COMMAND_DUTY, BINARY_COMMAND_PWM, BINARY_COMMAND_RPM,
  BINARY_COMMAND_SET, BINARY_COMMAND_START, BINARY_COMMAND_STATUS, BINARY_COMMAND_STOP,
  BINARY_COMMAND_TELEM_RATE, BINARY_COMMAND_VERSION, BINARY_COMMAND_TELEM_VALUE, BINARY_COMMAND_GET_PARAM_ID,
  BINARY_COMMAND_ACK = 250, BINARY_COMMAND_NACK
}
 
enum  binaryValues {
  BINARY_VALUE_NONE = 0, BINARY_VALUE_AMPS, BINARY_VALUE_VOLTS_BAT, BINARY_VALUE_VOLTS_MOTOR,
  BINARY_VALUE_RPM, BINARY_VALUE_DUTY, BINARY_VALUE_COMM_PERIOD, BINARY_VALUE_BAD_DETECTS,
  BINARY_VALUE_ADC_WINDOW, BINARY_VALUE_IDLE_PERCENT, BINARY_VALUE_STATE, BINARY_VALUE_AVGA,
  BINARY_VALUE_AVGB, BINARY_VALUE_AVGC, BINARY_VALUE_AVGCOMP, BINARY_VALUE_FETSTEP,
  BINARY_VALUE_NUM
}
 
enum  configParameters {
  CONFIG_VERSION = 0, STARTUP_MODE, BAUD_RATE, PTERM,
  ITERM, FF1TERM, FF2TERM, CL1TERM,
  CL2TERM, CL3TERM, CL4TERM, CL5TERM,
  SHUNT_RESISTANCE, MIN_PERIOD, MAX_PERIOD, BLANKING_MICROS,
  ADVANCE, START_VOLTAGE, GOOD_DETECTS_START, BAD_DETECTS_DISARM,
  MAX_CURRENT, SWITCH_FREQ, MOTOR_POLES, PWM_MIN_PERIOD,
  PWM_MAX_PERIOD, PWM_MIN_VALUE, PWM_LO_VALUE, PWM_HI_VALUE,
  PWM_MAX_VALUE, PWM_MIN_START, PWM_RPM_SCALE, FET_BRAKING,
  PNFAC, INFAC, THR1TERM, THR2TERM,
  START_ALIGN_TIME, START_ALIGN_VOLTAGE, START_STEPS_NUM, START_STEPS_PERIOD,
  START_STEPS_ACCEL, PWM_LOWPASS, RPM_MEAS_LP, SERVO_DUTY,
  SERVO_P, SERVO_D, SERVO_MAX_RATE, SERVO_SCALE,
  ESC_ID, DIRECTION, CONFIG_NUM_PARAMS
}
 

Functions

void esc32_init (void)
 
void esc32_periodic (void)
 
void esc32_event (void)
 

Variables

struct esc32 esc32
 

Detailed Description

Author
Murat Bronz Connection between esc32v3

Definition in file esc32.h.


Data Structure Documentation

struct esc32_parameter

Definition at line 35 of file esc32.h.

Data Fields
float amps current consumption
float duty motor duty cycle (more or less throttle in %)
float rpm motor rotation speed
float volts_bat input battery voltage
float volts_motor motor voltage (bat voltage * throttle in % in fact)
struct esc32

Definition at line 43 of file esc32.h.

+ Collaboration diagram for esc32:
Data Fields
bool data_available data updated
float energy accumulated energy
struct esc32_parameter params filtered data from the esc
float power computed battery power

Enumeration Type Documentation

Enumerator
BINARY_COMMAND_NOP 
BINARY_COMMAND_ARM 
BINARY_COMMAND_CLI 
BINARY_COMMAND_CONFIG 
BINARY_COMMAND_DISARM 
BINARY_COMMAND_DUTY 
BINARY_COMMAND_PWM 
BINARY_COMMAND_RPM 
BINARY_COMMAND_SET 
BINARY_COMMAND_START 
BINARY_COMMAND_STATUS 
BINARY_COMMAND_STOP 
BINARY_COMMAND_TELEM_RATE 
BINARY_COMMAND_VERSION 
BINARY_COMMAND_TELEM_VALUE 
BINARY_COMMAND_GET_PARAM_ID 
BINARY_COMMAND_ACK 
BINARY_COMMAND_NACK 

Definition at line 52 of file esc32.h.

Enumerator
BINARY_VALUE_NONE 
BINARY_VALUE_AMPS 
BINARY_VALUE_VOLTS_BAT 
BINARY_VALUE_VOLTS_MOTOR 
BINARY_VALUE_RPM 
BINARY_VALUE_DUTY 
BINARY_VALUE_COMM_PERIOD 
BINARY_VALUE_BAD_DETECTS 
BINARY_VALUE_ADC_WINDOW 
BINARY_VALUE_IDLE_PERCENT 
BINARY_VALUE_STATE 
BINARY_VALUE_AVGA 
BINARY_VALUE_AVGB 
BINARY_VALUE_AVGC 
BINARY_VALUE_AVGCOMP 
BINARY_VALUE_FETSTEP 
BINARY_VALUE_NUM 

Definition at line 73 of file esc32.h.

Enumerator
CONFIG_VERSION 
STARTUP_MODE 
BAUD_RATE 
PTERM 
ITERM 
FF1TERM 
FF2TERM 
CL1TERM 
CL2TERM 
CL3TERM 
CL4TERM 
CL5TERM 
SHUNT_RESISTANCE 
MIN_PERIOD 
MAX_PERIOD 
BLANKING_MICROS 
ADVANCE 
START_VOLTAGE 
GOOD_DETECTS_START 
BAD_DETECTS_DISARM 
MAX_CURRENT 
SWITCH_FREQ 
MOTOR_POLES 
PWM_MIN_PERIOD 
PWM_MAX_PERIOD 
PWM_MIN_VALUE 
PWM_LO_VALUE 
PWM_HI_VALUE 
PWM_MAX_VALUE 
PWM_MIN_START 
PWM_RPM_SCALE 
FET_BRAKING 
PNFAC 
INFAC 
THR1TERM 
THR2TERM 
START_ALIGN_TIME 
START_ALIGN_VOLTAGE 
START_STEPS_NUM 
START_STEPS_PERIOD 
START_STEPS_ACCEL 
PWM_LOWPASS 
RPM_MEAS_LP 
SERVO_DUTY 
SERVO_P 
SERVO_D 
SERVO_MAX_RATE 
SERVO_SCALE 
ESC_ID 
DIRECTION 
CONFIG_NUM_PARAMS 

Definition at line 93 of file esc32.h.

Function Documentation

void esc32_event ( void  )

Definition at line 345 of file esc32.c.

References esc32_private::dev, esc32_parse_msg(), esc32_priv, esc32_private::msg_available, parse_esc32(), uart_char_available(), and uart_getch().

+ Here is the call graph for this function:

void esc32_init ( void  )

Definition at line 235 of file esc32.c.

References esc32_private::cmd_seq_id, DefaultPeriodic, esc32_private::dev, esc32_msg_send(), esc32_priv, and register_periodic_telemetry().

+ Here is the call graph for this function:

Variable Documentation

struct esc32 esc32

Definition at line 38 of file esc32.c.