Paparazzi UAS
v5.8.2_stable-0-g6260b7c
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 "subsystems/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 | |
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 50 of file bat_voltage_ardrone2.c.
References electrical_ardrone2_setup(), fd, and I2C_SLAVE_FORCE.
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.
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().
int fd |
Definition at line 48 of file bat_voltage_ardrone2.c.
Referenced by bat_voltage_ardrone2_init(), bat_voltage_ardrone2_periodic(), and electrical_ardrone2_setup().