1.调整获取到不同模式时关机

This commit is contained in:
payton 2023-08-25 15:27:27 +08:00
parent 90ed0ddc7f
commit a30c6452c8

View File

@ -1518,12 +1518,20 @@ static const SF_CHAR* sf_process_message_getstatusstring(SF_MESSAGE_TYPE_E enTyp
static SINT32 sf_cardv_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
{
static UINT8 wifistart = 0;
UINT8 powerOnMode = 0;
//printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
//SF_MESSAGE_BUF_S stMessageBuf = {0};
MLOGI("ID = %#x\n",pMessageBuf->arg1);
switch(pMessageBuf->arg1)
{
case SF_MCU_CMD_POWERON:
powerOnMode = sf_cardv_convert_power_on_mode();
if(pMessageBuf->arg2 != powerOnMode)
{
MLOGE("err get powerOnMode:%d powerOnMode:%d\n",pMessageBuf->arg2, powerOnMode);
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_NORMAL);
}
sf_set_power_on_mode(pMessageBuf->arg2);
sf_mcu_set_irshtter(pMessageBuf->arg3);
break;