1.在
pmic.c中BAT_PERCENT_LINIT的定义,默认值为15,表示15%的低电量限制。
#define BAT_PERCENT_LINIT 15
2.在flash_mgr_m.cpp的FlashMgrM::setFlashOn()的内容。
void FlashMgrM::setFlashOn(int duty, int timeOut, int dutyLT, int timeOut2, int reTrig)
{
if(g_onOffCallBackFunc!=0)
g_onOffCallBackFunc(1);
logI("setFlashOn %d %d %d %d %d ln=%d",duty, timeOut, dutyLT, timeOut2, reTrig, __LINE__);
int isLow;
g_pStrobe->isLowPower(&isLow);
if(isLow==1)
{
logI("isLow=1 ln=%d",__LINE__);
return;
}
其中,如下代码就是在判断为低电时不打闪:
g_pStrobe->isLowPower(&isLow);
if(isLow==1)
{
logI("isLow=1 ln=%d",__LINE__);
return;
}