Project

General

Profile

Statistics
| Revision:

root / branches / encoders / code / lib / include / libdragonfly / battery.h @ 546

History | View | Annotate | Download (830 Bytes)

1 7 bcoltin
/**
2
 * @file battery.h
3
 * @brief Definitions for checking battery voltage.
4
 *
5
 * Contains definitions for checking the voltage of the
6
 * battery.
7
 *
8
 * @author Colony Project, CMU Robotics Club
9
 **/
10
11
#ifndef _BATTERY_H_
12
#define _BATTERY_H_
13
14
/**
15
 * @addtogroup battery
16
 * @{
17
 **/
18
19
/** @brief Normal battery voltage. (6 V) **/
20
#define BATTERY_NORMALV 154
21
/** @brief Charging battery voltage. (7 V) **/
22
#define BATTERY_CHARINGV 179
23
/** @brief Low battery voltage. ( < 6 V) **/
24
#define BATTERY_LOWV 152
25
26
/** @brief Read the battery voltage. **/
27
int battery8(void);
28
/** @brief Read the battery voltage in deciVolts. **/
29
int battery(void);
30
/** @brief Check if the battery is low. **/
31
char battery_low(void);
32
/** @brief get an average battery voltage reading. **/
33
int battery8_avg(int n_samples);
34
35
/** @} **/ //end addtogroup
36
37
#endif