Main Page
Namespaces
Classes
Files
File List
src
battery_state.cpp
Go to the documentation of this file.
1
#include <
tuw_vehicle_msgs/battery_state.h
>
2
3
using namespace
tuw::ros_msgs
;
4
5
BatteryState::BatteryState
(){
6
7
};
8
9
double
BatteryState::GetLowestCellVoltage
()
10
{
11
bool
lowestFound =
false
;
12
double
lowest = 0;
13
for
(
double
const
&voltage : this->cell_voltages)
14
{
15
if
(
false
== lowestFound || voltage < lowest)
16
{
17
lowest = voltage;
18
}
19
}
20
return
lowest;
21
}
22
23
double
BatteryState::GetTotalVoltage
()
24
{
25
double
sum = 0;
26
for
(
double
const
&voltage : this->cell_voltages)
27
{
28
sum += voltage;
29
}
30
return
sum;
31
}
battery_state.h
tuw::ros_msgs::BatteryState::GetTotalVoltage
double GetTotalVoltage()
Definition:
battery_state.cpp:23
tuw::ros_msgs::BatteryState::BatteryState
BatteryState()
Definition:
battery_state.cpp:5
tuw::ros_msgs
Definition:
battery_state.h:8
tuw::ros_msgs::BatteryState::GetLowestCellVoltage
double GetLowestCellVoltage()
Definition:
battery_state.cpp:9
tuw_vehicle_msgs
Author(s): Marcel Zeilinger
autogenerated on Mon Jun 10 2019 15:37:23