Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
kobuki_driver
modules
battery.hpp
Go to the documentation of this file.
1
9
/*****************************************************************************
10
** Ifdefs
11
*****************************************************************************/
12
13
#ifndef KOBUKI_BATTERY_HPP_
14
#define KOBUKI_BATTERY_HPP_
15
16
/*****************************************************************************
17
** Includes
18
*****************************************************************************/
19
20
#include <stdint.h>
21
#include "../packets/core_sensors.hpp"
22
#include "../macros.hpp"
23
24
/*****************************************************************************
25
** Namespaces
26
*****************************************************************************/
27
28
namespace
kobuki
{
29
30
/*****************************************************************************
31
** Interfaces
32
*****************************************************************************/
33
40
class
kobuki_PUBLIC
Battery
{
41
public
:
42
enum
Source
{
43
None
,
44
Adapter
,
45
Dock
46
};
47
enum
Level
{
48
Dangerous
,
49
Low
,
50
Healthy
,
51
Maximum
52
};
53
enum
State
{
54
Discharging
,
55
Charged
,
56
Charging
57
};
58
59
Battery
() {}
60
Battery
(
const
uint8_t &new_voltage,
const
uint8_t &charger_flag);
61
Level
level()
const
;
62
float
percent()
const
;
63
64
static
double
capacity
;
65
static
double
low
;
66
static
double
dangerous
;
67
double
voltage
;
68
State
charging_state
;
69
Source
charging_source
;
70
};
71
72
}
// namespace kobuki
73
74
#endif
/* KOBUKI_BATTERY_HPP_ */
kobuki::Battery::low
static double low
Definition:
battery.hpp:65
kobuki::Battery::Battery
Battery()
Definition:
battery.hpp:59
kobuki::Battery::State
State
Definition:
battery.hpp:53
kobuki::Battery::charging_source
Source charging_source
Definition:
battery.hpp:69
kobuki::Battery::Discharging
Definition:
battery.hpp:54
kobuki::Battery::Source
Source
Definition:
battery.hpp:42
kobuki::Battery::Low
Definition:
battery.hpp:49
kobuki
Definition:
command.hpp:31
kobuki_PUBLIC
#define kobuki_PUBLIC
Definition:
macros.hpp:39
kobuki::Battery::Adapter
Definition:
battery.hpp:44
kobuki::Battery::Healthy
Definition:
battery.hpp:50
kobuki::Battery::Dangerous
Definition:
battery.hpp:48
kobuki::Battery::charging_state
State charging_state
Definition:
battery.hpp:68
kobuki::Battery::voltage
double voltage
Definition:
battery.hpp:67
kobuki::Battery::Charged
Definition:
battery.hpp:55
kobuki::Battery::None
Definition:
battery.hpp:43
kobuki::Battery
Battery level module.
Definition:
battery.hpp:40
kobuki::Battery::capacity
static double capacity
Definition:
battery.hpp:64
kobuki::Battery::dangerous
static double dangerous
Definition:
battery.hpp:66
kobuki::Battery::Level
Level
Definition:
battery.hpp:47
kobuki_driver
Author(s): Daniel Stonier
, Younghun Ju
, Jorge Santos Simon
autogenerated on Fri Sep 18 2020 03:22:01