Paparazzi UAS  v5.15_devel-113-g1b57ff1
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

static 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 48 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 89 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 65 of file bat_voltage_ardrone2.c.

References fd, i2c_smbus_write_byte_data(), and x12.

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