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

Implemnetation for electrical status: supply voltage, current, battery status, etc. More...

#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 BAT_CHECKER_DELAY   5
 
#define ELECTRICAL_PERIODIC_FREQ   10
 
#define MIN_BAT_LEVEL   3
 
#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
 

Detailed Description

Implemnetation for electrical status: supply voltage, current, battery status, etc.

Definition in file electrical.c.

Macro Definition Documentation

#define BAT_CHECKER_DELAY   5

Definition at line 50 of file electrical.c.

Referenced by electrical_periodic().

#define CURRENT_ESTIMATION_NONLINEARITY   1.2

Definition at line 87 of file electrical.c.

Referenced by electrical_init().

#define ELECTRICAL_PERIODIC_FREQ   10

Definition at line 53 of file electrical.c.

Referenced by electrical_periodic().

#define MilliAmpereOfAdc (   adc)    DefaultMilliAmpereOfAdc(adc)

Definition at line 83 of file electrical.c.

Referenced by electrical_periodic().

#define MIN_BAT_LEVEL   3

Definition at line 56 of file electrical.c.

Referenced by electrical_periodic().

#define VoltageOfAdc (   adc)    DefaultVoltageOfAdc(adc)

Definition at line 80 of file electrical.c.

Referenced by electrical_periodic().

Function Documentation

Variable Documentation

struct Electrical electrical

Definition at line 63 of file electrical.c.