Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot_firmware.c File Reference

Fixedwing specific autopilot interface and initialization. More...

#include "firmwares/fixedwing/autopilot_firmware.h"
#include "state.h"
#include "firmwares/fixedwing/nav.h"
#include <stdint.h>
#include "subsystems/datalink/telemetry.h"
#include "generated/settings.h"
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include <CTRL_TYPE_H>
+ Include dependency graph for autopilot_firmware.c:

Go to the source code of this file.

Functions

static void send_mode (struct transport_tx *trans, struct link_device *dev)
 
static void send_estimator (struct transport_tx *trans, struct link_device *dev)
 
static void send_bat (struct transport_tx *trans, struct link_device *dev)
 
static void send_energy (struct transport_tx *trans, struct link_device *dev)
 
static void send_desired (struct transport_tx *trans, struct link_device *dev)
 
static void send_airspeed (struct transport_tx *trans, struct link_device *dev)
 
void autopilot_send_mode (void)
 Report autopilot mode on default downlink channel. More...
 
void autopilot_firmware_init (void)
 Init function. More...
 

Variables

uint16_t vsupply
 Supply voltage in deciVolt. More...
 
int32_t current
 Supply current in milliAmpere. More...
 
float energy
 Energy consumption (mAh) This is the ap copy of the measurement from fbw FIXME use electrical module ? More...
 
uint8_t lateral_mode
 
uint8_t mcu1_status
 Second MCU status (FBW part) More...
 
uint8_t rc_settings_mode = 0
 

Detailed Description

Fixedwing specific autopilot interface and initialization.

Definition in file autopilot_firmware.c.

Function Documentation

void autopilot_firmware_init ( void  )

Init function.

Definition at line 133 of file autopilot_firmware.c.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

void autopilot_send_mode ( void  )

Report autopilot mode on default downlink channel.

Report autopilot mode on default downlink channel.

Definition at line 125 of file autopilot_firmware.c.

References DefaultChannel, DefaultDevice, and send_mode().

+ Here is the call graph for this function:

static void send_airspeed ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 110 of file autopilot_firmware.c.

References dev, stateGetAirspeed_f(), v_ctl_auto_airspeed_controlled, v_ctl_auto_airspeed_setpoint, and v_ctl_auto_groundspeed_setpoint.

Referenced by autopilot_firmware_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_bat ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 70 of file autopilot_firmware.c.

References autopilot, block_time, current, energy, pprz_autopilot::flight_time, pprz_autopilot::kill_throttle, stage_time, v_ctl_throttle_slewed, and vsupply.

Referenced by autopilot_firmware_init().

+ Here is the caller graph for this function:

static void send_desired ( struct transport_tx *  trans,
struct link_device *  dev 
)
static
static void send_energy ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 84 of file autopilot_firmware.c.

References current, energy, and vsupply.

Referenced by autopilot_firmware_init().

+ Here is the caller graph for this function:

static void send_estimator ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 64 of file autopilot_firmware.c.

References stateGetPositionUtm_f(), and stateGetSpeedEnu_f().

Referenced by autopilot_firmware_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_mode ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 58 of file autopilot_firmware.c.

References autopilot, horizontal_mode, lateral_mode, mcu1_status, pprz_autopilot::mode, rc_settings_mode, and v_ctl_mode.

Referenced by autopilot_firmware_init(), and autopilot_send_mode().

+ Here is the caller graph for this function:

Variable Documentation

int32_t current

Supply current in milliAmpere.

This the ap copy of the measurement from fbw FIXME use electrical module ?

Definition at line 36 of file autopilot_firmware.c.

Referenced by autopilot_firmware_init(), autopilot_generated_on_rc_frame(), autopilot_static_on_rc_frame(), send_bat(), and send_energy().

float energy

Energy consumption (mAh) This is the ap copy of the measurement from fbw FIXME use electrical module ?

Definition at line 37 of file autopilot_firmware.c.

Referenced by autopilot_firmware_init(), autopilot_generated_on_rc_frame(), autopilot_static_on_rc_frame(), generic_com_periodic(), send_bat(), and send_energy().

uint8_t mcu1_status

Second MCU status (FBW part)

Definition at line 40 of file autopilot_firmware.c.

Referenced by mcu1_status_update(), and send_mode().

uint8_t rc_settings_mode = 0

Definition at line 55 of file autopilot_firmware.c.

Referenced by send_mode().

uint16_t vsupply

Supply voltage in deciVolt.

This the ap copy of the measurement from fbw FIXME use electrical module ?

Definition at line 35 of file autopilot_firmware.c.

Referenced by attitude_loop(), autopilot_firmware_init(), autopilot_generated_on_rc_frame(), autopilot_static_on_rc_frame(), gsm_send_report_continue(), monitor_task(), send_bat(), send_energy(), and v_ctl_guidance_loop().