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_raw.c File Reference

arch specific electrical status readings More...

#include "electrical_raw.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/time.h>
#include <unistd.h>
#include <math.h>
#include "i2c-dev.h"
#include "subsystems/commands.h"
#include "generated/airframe.h"
+ Include dependency graph for electrical_raw.c:

Go to the source code of this file.

Macros

#define CURRENT_ESTIMATION_NONLINEARITY   1.2
 

Functions

void electrical_init (void)
 
void electrical_setup (void)
 
void electrical_periodic (void)
 

Variables

struct Electrical electrical
 
int fd
 

Detailed Description

arch specific electrical status readings

Definition in file electrical_raw.c.

Macro Definition Documentation

#define CURRENT_ESTIMATION_NONLINEARITY   1.2

Definition at line 65 of file electrical_raw.c.

Referenced by electrical_init().

Function Documentation

void electrical_init ( void  )

Definition at line 70 of file electrical_raw.c.

References CURRENT_ESTIMATION_NONLINEARITY, electrical_setup(), fd, and I2C_SLAVE_FORCE.

+ Here is the call graph for this function:

void electrical_periodic ( void  )

Definition at line 108 of file electrical_raw.c.

References commands, Electrical::current, electrical, electrical_setup(), fd, i2c_smbus_read_byte_data(), MAX_PPRZ, and Electrical::vsupply.

+ Here is the call graph for this function:

void electrical_setup ( void  )

Definition at line 85 of file electrical_raw.c.

References fd, and i2c_smbus_write_byte_data().

Referenced by electrical_init(), and electrical_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct Electrical electrical

Definition at line 42 of file electrical_raw.c.

Referenced by electrical_periodic().

int fd