Flair
Framework Libre Air
BatteryMonitor.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef BATTERYMONITOR_H
14 #define BATTERYMONITOR_H
15 
16 #include <GroupBox.h>
17 
18 namespace flair {
19 namespace gui {
20 class LayoutPosition;
21 class Label;
22 class DoubleSpinBox;
23 class SpinBox;
24 }
25 }
26 
27 namespace flair {
28 namespace sensor {
29 
35 class BatteryMonitor : public gui::GroupBox {
36 public:
45  BatteryMonitor(const gui::LayoutPosition *position, std::string name);
46 
52 
59  bool IsBatteryLow(void);
60 
67  void SetBatteryValue(float value);
68 
75  float GetVoltage(void) const;
76 
77 private:
78  float batteryvalue;
79  gui::DoubleSpinBox *battery_thresh;
80  gui::SpinBox *thresholdTime;
81  gui::Label *battery;
82  core::Time underThersholdStartTime;
83  bool isUnderThershold;
84 };
85 } // end namespace sensor
86 } // end namespace flair
87 
88 #endif // BATTERYMONITOR_H
namespace of the flair Framework
Definition: Ahrs.h:19
Class displaying a QGroupBox on the ground station.
Definition: GroupBox.h:27
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
BatteryMonitor(const gui::LayoutPosition *position, std::string name)
Constructor.
bool IsBatteryLow(void)
Is batteru low?
Class displaying a QLabel on the ground station.
Definition: Label.h:28
Base class for battery monitor.
Definition: BatteryMonitor.h:35
Class displaying a QDoubleSpinBox on the ground station.
Definition: DoubleSpinBox.h:28
Class displaying a QGroupBox on the ground station.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
void SetBatteryValue(float value)
Set battery value.
float GetVoltage(void) const
Get battery voltage.