1.电池电量等级(Device.h):
typedef enum
{
BATTERY_LOW_POWEROFF = 0,
BATTERY_LOW_TX_PROHIBIT,
BATTERY_LOW_WARNING,
BATTERY_LEVEL_0,
BATTERY_LEVEL_1,
BATTERY_LEVEL_2,
BATTERY_LEVEL_3,
#if 1
BATTERY_LEVEL_4, /* BATTERY_LEVEL_4 */
BATTERY_LEVEL_5, /* BATTERY_LEVEL_5 */
BATTERY_LEVEL_6, /* BATTERY_LEVEL_6 */
BATTERY_LEVEL_7, /* BATTERY_LEVEL_7 */
BATTERY_LEVEL_LAST = 11
#else
BATTERY_LEVEL_4 = BATTERY_LEVEL_3, /* BATTERY_LEVEL_4 */
BATTERY_LEVEL_5 = BATTERY_LEVEL_3, /* BATTERY_LEVEL_5 */
BATTERY_LEVEL_6 = BATTERY_LEVEL_3, /* BATTERY_LEVEL_6 */
BATTERY_LEVEL_LAST = 9
#endif
} battery_level_enum;
2.电池电量各等级电压值(Nvram_user_config.c):
kal_uint32 const NVRAM_EF_CUST_HW_LEVEL_TBL_DEFAULT[] = {
......
/* Battery voltage Level */
#ifdef __OUR_PROJECT__
#if 1
3300000, /* Low Battery Power off */
3500000, /* Low Battery */
/* battery level 1 ~ 8 */
3550000, 3600000, 3700000, 3730000,
#else
3300000, /* Low Battery Power off */
3500000, /* Low Battery */
/* battery level 1 ~ 8 */
3520000, 3610000, 3710000, 3810000,
#endif
#else
3200000, /* Low Battery Power off */
3500000, /* Low Battery */
/* battery level 1 ~ 8 */
3550000, 3640000, 3740000, 3870000,
#endif
/* 3698671, 3801801, 4003424, 9999999, Changed by Melvin*/
#if 1
3750000, 3800000, 3850000, 4020000,
#else
9999999, 9999999, 9999999, 9999999,
#endif
......
};
3.电池电量各等级电压值根据锂电池放电曲线可得,具体待更新:
4.电池电量百分比显示
(1)、在电池等级更新时同时更新百分比,此值与电池电量等级对应;
(2)、自己手动控制电池电量值的获取,具体待更新;
阅读(4837) | 评论(0) | 转发(0) |