Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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 "modules/energy/electrical.h"
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 |
Read battery voltage on ARDrone2 and publish to electrical subsystem.
Read the battery voltage on ARDrone2.
Definition in file bat_voltage_ardrone2.c.
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.
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.
void electrical_ardrone2_setup | ( | void | ) |
Definition at line 65 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().
|
static |
Definition at line 46 of file bat_voltage_ardrone2.c.
Referenced by bat_voltage_ardrone2_init(), bat_voltage_ardrone2_periodic(), and electrical_ardrone2_setup().