Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
electrical.h File Reference

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

#include "std.h"
#include "generated/airframe.h"
+ Include dependency graph for electrical.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Electrical
 

Macros

#define LOW_BAT_LEVEL   10.5
 low battery level in Volts (for 3S LiPo) More...
 
#define CRITIC_BAT_LEVEL   9.8
 critical battery level in Volts (for 3S LiPo) More...
 

Functions

void electrical_init (void)
 
void electrical_periodic (void)
 
void electrical_avg_reset (float var)
 

Variables

struct Electrical electrical
 

Detailed Description

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

Definition in file electrical.h.


Data Structure Documentation

◆ Electrical

struct Electrical

Definition at line 44 of file electrical.h.

Data Fields
uint32_t avg_cnt average power counter
uint32_t avg_power average power sum
bool bat_critical battery critical status
bool bat_low battery low status
float charge consumed electric charge in Ah
float current current in A
float energy consumed energy in Wh
float vboard board voltage in V
float vsupply supply voltage in V

Macro Definition Documentation

◆ CRITIC_BAT_LEVEL

#define CRITIC_BAT_LEVEL   9.8

critical battery level in Volts (for 3S LiPo)

Definition at line 41 of file electrical.h.

◆ LOW_BAT_LEVEL

#define LOW_BAT_LEVEL   10.5

low battery level in Volts (for 3S LiPo)

Definition at line 36 of file electrical.h.

Function Documentation

◆ electrical_avg_reset()

void electrical_avg_reset ( float  var)

Definition at line 274 of file electrical.c.

References Electrical::avg_cnt, Electrical::avg_power, and electrical.

◆ electrical_init()

◆ electrical_periodic()

Variable Documentation

◆ electrical