Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
electrical.c File Reference
#include "subsystems/electrical.h"
#include "mcu_periph/adc.h"
#include "subsystems/commands.h"
#include "generated/airframe.h"
#include <BOARD_CONFIG>
+ Include dependency graph for electrical.c:

Go to the source code of this file.

Macros

#define VoltageOfAdc(adc)   DefaultVoltageOfAdc(adc)
 
#define MilliAmpereOfAdc(adc)   DefaultMilliAmpereOfAdc(adc)
 
#define CURRENT_ESTIMATION_NONLINEARITY   1.2
 

Functions

void electrical_init (void)
 
void electrical_periodic (void)
 

Variables

struct Electrical electrical
 

Macro Definition Documentation

#define CURRENT_ESTIMATION_NONLINEARITY   1.2

Definition at line 46 of file electrical.c.

Referenced by electrical_init().

#define MilliAmpereOfAdc (   adc)    DefaultMilliAmpereOfAdc(adc)

Definition at line 42 of file electrical.c.

Referenced by electrical_periodic().

#define VoltageOfAdc (   adc)    DefaultVoltageOfAdc(adc)

Definition at line 39 of file electrical.c.

Referenced by electrical_periodic().

Function Documentation

void electrical_init ( void  )

Definition at line 49 of file electrical.c.

References adc_buf_channel(), ADC_CHANNEL_VSUPPLY, Electrical::current, CURRENT_ESTIMATION_NONLINEARITY, DEFAULT_AV_NB_SAMPLE, electrical, and Electrical::vsupply.

+ Here is the call graph for this function:

void electrical_periodic ( void  )

Variable Documentation

struct Electrical electrical

Definition at line 22 of file electrical.c.

Referenced by electrical_init(), and electrical_periodic().