Subversion Repositories tpanel

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
247 andreas 1
#ifndef TIOSBATTERY_H
2
#define TIOSBATTERY_H
3
 
4
 
5
class TIOSBattery
6
{
7
    public:
8
        typedef enum BSTATE
9
        {
10
            BS_UNKNOWN,
11
            BS_UNPLUGGED,
12
            BS_CHARGING,
13
            BS_FULL
14
        }BSTATE;
15
 
16
        TIOSBattery();
17
 
18
        void update();
19
        int getBatteryLeft() { return mLeft; }
20
        int getBatteryState() { return mState; }
21
 
22
    private:
23
        int mLeft{0};               // The left battery %
24
        BSTATE mState{BS_UNKNOWN};  // The state (plugged, charging, ...)
25
};
26
 
27
#endif // TIOSBATTERY_H