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

Read battery voltage on ARDrone2 and publish to electrical subsystem. More...

#include "modules/sensors/bat_voltage_ardrone2.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/time.h>
#include <unistd.h>
#include <math.h>
#include "mcu_periph/i2c_smbus.h"
#include "subsystems/electrical.h"
+ Include dependency graph for bat_voltage_ardrone2.c:

Go to the source code of this file.

Functions

void electrical_ardrone2_setup (void)
 
void bat_voltage_ardrone2_init (void)
 
void bat_voltage_ardrone2_periodic (void)
 

Variables

int fd
 

Detailed Description

Read battery voltage on ARDrone2 and publish to electrical subsystem.

Read the battery voltage on ARDrone2.

Definition in file bat_voltage_ardrone2.c.

Function Documentation

void bat_voltage_ardrone2_init ( void  )

Definition at line 50 of file bat_voltage_ardrone2.c.

References electrical_ardrone2_setup(), fd, and I2C_SLAVE_FORCE.

+ Here is the call graph for this function:

void bat_voltage_ardrone2_periodic ( void  )

Definition at line 86 of file bat_voltage_ardrone2.c.

References electrical, electrical_ardrone2_setup(), fd, i2c_smbus_read_byte_data(), and Electrical::vsupply.

+ Here is the call graph for this function:

void electrical_ardrone2_setup ( void  )

Definition at line 62 of file bat_voltage_ardrone2.c.

References fd, and i2c_smbus_write_byte_data().

Referenced by bat_voltage_ardrone2_init(), and bat_voltage_ardrone2_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation