完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
系统版本:RK3288 android 5.1 (与参考的变量和宏有点区别)
设备没有电池,在进行Fota升级时,提示电量不能低于30%,外接电源,可是读出来的电量是0%,无法进行升级,只能手动设置电池电量。 $ adb shell dumpsys battery //通过adb查询电池信息 Current Battery Service state: AC powered: false USB powered: false Wireless powered: false status: 1 health: 1 present: true level: 0 //电池电量 scale: 100 voltage: 0 temperature: 0 technology: diff --git a/system/core/healthd/BatteryMonitor.cpp b/system/core/healthd/BatteryMonitor.cpp old mode 100644 new mode 100755 index d317b28..6b37dee --- a/system/core/healthd/BatteryMonitor.cpp +++ b/system/core/healthd/BatteryMonitor.cpp @@ -35,7 +35,7 @@ #define POWER_SUPPLY_SUBSYSTEM "power_supply" #define POWER_SUPPLY_SYSFS_PATH "/sys/class/" POWER_SUPPLY_SUBSYSTEM -#define FAKE_BATTERY_CAPACITY 42 +#define FAKE_BATTERY_CAPACITY 100 #define FAKE_BATTERY_TEMPERATURE 424 namespace android { @@ -513,8 +513,14 @@ void BatteryMonitor::init(struct healthd_config *hc) { closedir(dir); } - if (!mChargerNames.size()) + if (!mChargerNames.size()) { KLOG_ERROR(LOG_TAG, "No charger supplies foundn"); + /*------------电池电量一直显示100%------------*/ + mBatteryFixedCapacity = FAKE_BATTERY_CAPACITY; //电量 level + mBatteryFixedTemperature = FAKE_BATTERY_TEMPERATURE; //温度 temperature + mBatteryDevicePresent = true; + /*------------------------------------------------*/ + } if (!mBatteryDevicePresent) { KLOG_WARNING(LOG_TAG, "No battery devices foundn"); hc->periodic_chores_interval_fast = -1; $ adb shell dumpsys battery Current Battery Service state: AC powered: false USB powered: false Wireless powered: false status: 1 health: 1 present: true level: 100 //电池电量 scale: 100 voltage: 0 temperature: 424 technology: |
|
|
|
|
|
1988 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
2490 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
5272 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 17:17 , Processed in 0.427733 second(s), Total 40, Slave 30 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号