diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 1ce29593b..e320ae63d 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -1708,10 +1708,10 @@ static SINT32 sf_cardv_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf) break; case SF_DEV_CMD_BAT: batteryVal = pMessageBuf->arg2; - batteryType = pMessageBuf->arg3 & 0xf0; - powerVal = pMessageBuf->arg3 & 0xf; + batteryType = (pMessageBuf->arg3>>16)&0x0F;//pMessageBuf->arg3 & 0xf0; + powerVal = pMessageBuf->arg3 & 0xFF; sf_cardv_battery_level_update(batteryVal); - MLOGI("batteryVal:%d batteryType:%d\n",batteryVal,batteryType); + MLOGI("batteryVal:%d batteryType:%d powerVal:%d p:%d\n",batteryVal, batteryType, powerVal,pMessageBuf->arg3); break;