-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathchargeAction.h
104 lines (85 loc) · 2.45 KB
/
chargeAction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
* Copyright 2020 loutremaline79
*
* This file is part of QtSkyCharge.
*
* QtSkyCharge is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <https://www.gnu.org/licenses/>
*/
#ifndef CHARGEACTION_H
#define CHARGEACTION_H
#include "enum.h"
/**
* @brief Action that could be processed on charger device.
*/
class ChargeAction
{
public:
/**
* @brief Battery type (default : LiPo).
*/
BatteryType type = BatteryType::LiPo;
/**
* @brief Cells number.
*/
unsigned char cells;
/**
* @brief mode (default : NiCharge / LiCharge)
*/
unsigned char mode = 0x00;
/**
* @brief Charge current (default 0.1A)
*/
unsigned short chargeCurrent = 100;
/**
* @brief Discharge Current (default : 0.1A)
*/
unsigned short dischargeCurrent = 100;
/**
* @brief Charge / discharge cycle number (default : 1)
*/
unsigned char cycleCount = 1;
/**
* @brief Delay between charge and discharge in cyle (default : 10mn).
*/
unsigned char cycleDelay = 10;
/**
* @brief Start mode (discharge or charge) for cycle (default : DCHG_CHG)
*/
CycleWay cycleWay;
/**
* @brief Delta Peak (default : 4mV)
*/
unsigned char peakSense = 4;
/**
* @brief ??? mA (default : 0)
*/
unsigned short trickle = 0;
/**
* @brief Re-peak cycle count (default : 1)
*/
unsigned char rPeakCount;
/**
* @brief Cut voltage for discharge NiXX (default: 3200mV).
*/
unsigned short cutVoltage;
/**
* @brief Predefined discharge end voltage (for each battery type)
*/
unsigned short predefinedDischargeCutVoltage[7] = {3200, 2600, 3100, 3200, 1000, 1000, 1800};
/**
* @brief Predefined charge end voltage (for each battery type)
*/
unsigned short predefinedChargeCutVoltage[7] = {4200, 3600, 4100, 4350, 1800, 1800, 2400};
};
#endif // CHARGEACTION_H