battery_state.cpp
Go to the documentation of this file.
2 
3 using namespace tuw::ros_msgs;
4 
6 
7 };
8 
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 
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
Definition: battery_state.h:8
tuw::ros_msgs::BatteryState::BatteryState
BatteryState()
Definition: battery_state.cpp:5
tuw::ros_msgs::BatteryState::GetLowestCellVoltage
double GetLowestCellVoltage()
Definition: battery_state.cpp:9
tuw::ros_msgs::BatteryState::GetTotalVoltage
double GetTotalVoltage()
Definition: battery_state.cpp:23


tuw_vehicle_msgs
Author(s): Marcel Zeilinger
autogenerated on Wed Aug 10 2022 02:12:00