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 }


tuw_vehicle_msgs
Author(s): Marcel Zeilinger
autogenerated on Mon Jun 10 2019 15:37:23