You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/BatteryConstants.h
+3
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@
4
4
5
5
// Initial Values (for resetting registers)
6
6
#defineMAXMIN_VOLT_INITIAL_VALUE 0x00FF
7
+
#defineMAXMIN_CURRENT_INITIAL_VALUE 0x807F
7
8
8
9
// Conversion factors (See section "ModelGauge m5 Register Standard Resolutions" in the datasheet)
9
10
#defineVOLTAGE_MULTIPLIER_MV (1.25 / 16) // Resolution: 78.125 μV per LSB
10
11
#defineCURRENT_MULTIPLIER_MA 0.15625 // Resolution: 0.15625 mA per LSB for MAX17262R
12
+
#defineMAXMIN_CURRENT_MULTIPLIER_MA 160 // Resolution: 160mA per LSB
11
13
#defineCAPACITY_MULTIPLIER_MAH 0.5 // Resolution: 0.5mAh per LSB for MAX17262R
12
14
#definePERCENTAGE_MULTIPLIER (1.0 / 256) // Resolution: 1/256% per LSB
13
15
#defineTIME_MULTIPLIER_S 5.625 // Resolution: 5.625 seconds per LSB
@@ -49,6 +51,7 @@
49
51
#defineAT_RATE_REG 0x04
50
52
#defineCURRENT_REG 0x0A // The MAX17262 uses internal current sensing to monitor the current through the SYS pin. The measurement value is stored in two's-complement format.
51
53
#defineAVG_CURRENT_REG 0x0B // The AvgCurrent register reports an average of Current register readings.
54
+
#defineMAXMIN_CURRENT_REG 0x1C // The MaxMinCurr register maintains the maximum and minimum Current register values since the last IC reset or until cleared by host software.
52
55
#defineTTE_REG 0x11 // The TTE register holds the estimated time to empty for the application under present temperature and load conditions. TTE register is only valid when current register is negative.
53
56
#defineTTF_REG 0x20 // The TTF register holds the estimated time to full for the application under present conditions. The TTF register is only valid when the current register is positive.
0 commit comments