关机充电过压亮屏显示过压图标
时间:10-02
整理:3721RD
点击:
关机充电过压亮屏显示过压图标
在手机关机情况下
插入充电器,然后手机会进入关机充电模式
现在需要手机在继续充电过程中如果达到过压的时候要有亮屏的提醒
解决方法:
1)在Battery_common.c文件中
- static void mt_battery_notify_VCharger_check(void)
- {
- #if defined(BATTERY_NOTIFY_CASE_0001_VCHARGER)
- #if defined(CONFIG_mtk_DUAL_INPUT_CHARGER_SUPPORT)
- kal_uint32 v_charger_max = DISO_data.hv_voltage;
- #endif
- #if !defined(CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT)
- if (BMT_status.charger_vol >V_CHARGER_MAX)//修改为客制化的电压值
- {
- #else
- if (BMT_status.charger_vol > v_charger_max) {
- #endif
2)charging_control.cpp文件中
- static int on_uevent(const char *buf, int len_buf)
- {
- #ifdef VERBOSE_OUTPUT
- KPOC_LOGI("on_uevent, %s\n", buf);
- #endif
- check_ov();//add this line
- if (!strcasestr(buf, UEVENT_BATTERY_CHANGE))
- return 1;
3)bootlogo.cpp文件中添加如下代码:
- void check_ov()
- {
- if (get_battnotify_status())
- {
- suspend_request(false);
- usleep(2000*1000);
- start_backlight();
- usleep(3000*1000);
- show_charger_ov_logo();
- usleep(5000*1000);
- stop_backlight();
- suspend_request(true);//add by cassy
- }
- }
4)bootlogo.h文件中
- void bootlogo_show_charging(int, int);
- void check_ov();//add this line
5)main.h文件中
- int lights_chgexit();
- void suspend_request(bool enable);//add this line
6)charging_control.cpp文件中添加如下代码
- void suspend_request(bool enable)
- {
- request_suspend(enable);
- }
8)编译修改后的kpoc部分文档
命令:mmm vendor/mediatek/proprietary/external/charger
并将生成的kpoc_charger push到手机中
命令:adb shell push
alps/out/target/product/k35v1_64_op02/system/bin/kpoc_charger /system/bin
adb shell chmod 755 system/bin/kpoc_charger
不错!
学习
