-
Notifications
You must be signed in to change notification settings - Fork 4
Structures
Maciej Sopyło edited this page Apr 18, 2018
·
2 revisions
This page describes the struct
s defined by the library.
Contains the charger's system settings.
struct SysInfo {
unsigned int cycleTime, timeLimit, capLimit, lowDCLimit, tempLimit, voltage, cells[8];
bool timeLimitOn, capLimitOn, keyBuzzer, systemBuzzer;
};
field | type | SI unit | description |
---|---|---|---|
cycleTime |
unsigned int |
minutes | time between cycles (used for cycling Ni-* batteries) |
timeLimit |
unsigned int |
minutes | safety time limit, if the charging takes longer it stops |
capLimit |
unsigned int |
mAh | safety capacity limit, if the battery takes more charging stops |
lowDCLimit |
unsigned int |
mV | safety for when using battery power (in mV), turns the charger off if the DC source voltage falls below this value |
tempLimit |
unsigned int |
°C | safety temperature limit, if the internal or external temperature exceeds this value charging stops |
voltage |
unsigned int |
mV | current voltage on the main battery connector |
cells[8] |
unsigned int |
mV | voltage on each of the batteries connected to the balancing socket |
timeLimitOn |
bool |
whether the safety time limit is enabled | |
capLimitOn |
bool |
whether the safety capacity limit is enabled | |
keyBuzzer |
bool |
whether the key buzzer in the charger is enabled | |
systemBuzzer |
bool |
whether the system buzzer in the charger is enabled |
Contains the current charging information.
struct ChargeInfo {
unsigned int state, tempExt, tempInt, capacity, time, voltage, current, impendance, cells[8];
};
field | type | SI unit | description |
---|---|---|---|
state |
unsigned int |
state the charger is in (TODO: b6::STATE ) |
|
tempExt |
unsigned int |
°C | temperature of the external probe |
tempInt |
unsigned int |
°C | temperature of the charger's internal probe |
capacity |
unsigned int |
mAh | capacity computed during this charging process |
time |
unsigned int |
seconds | duration of the charging process |
voltage |
unsigned int |
mV | voltage on the main battery connector (basically battery/charging voltage) |
current |
unsigned int |
mA | charging current |
impendance |
unsigned int |
mΩ | charger internal impedance |
cells[8] |
unsigned int |
mV | voltage on each of the batteries connected to the balancing socket |
Used to set the charging parameters.
struct ChargeProfile {
BATTERY_TYPE batteryType;
uint8_t cellCount, rPeakCount, cycleType, cycleCount;
union {
CHARGING_MODE_LI li;
CHARGING_MODE_NI ni;
CHARGING_MODE_PB pb;
} mode;
uint16_t chargeCurrent, dischargeCurrent, cellDischargeVoltage, endVoltage, trickleCurrent;
};
field | type | SI unit | description |
---|---|---|---|
batteryType |
b6::BATTERY_TYPE |
the type of the battery that is going to be charged | |
cellCount |
uint8_t |
number of cells in the battery | |
rPeakCount |
uint8_t |
number of re-pek cycles (Ni-* batteries, re-peak mode only) | |
cycleType |
uint8_t |
type of the cycles (Ni-* batteries, cycle mode only) | |
cycleCount |
uint8_t |
number of charge←→discharge cycles (Ni-* batteries, cycle mode only) | |
mode.li |
b6::CHARGING_MODE_LI |
charging mode for the Li-* batteries | |
mode.ni |
b6::CHARGING_MODE_NI |
charging mode for the Ni-* batteries | |
mode.pb |
b6::CHARGING_MODE_PB |
charging mode for the lead-acid batteries | |
chargeCurrent |
uint16_t |
mA | charging current |
dischargeCurrent |
uint16_t |
mA | discharging current |
cellDischargeVoltage |
uint16_t |
mV | voltage at which discharging stops (per cell) |
endVoltage |
uint16_t |
mV | voltage at which charging stops (per cell) |
trickleCurrent |
uint16_t |
mA | trickle charging current (last phase of lead-acid charging) |