1.还原快捷关机,使用写mcu关机

This commit is contained in:
payton 2024-01-02 20:59:53 +08:00
parent 8240b16580
commit 86d43cbb8c
2 changed files with 2 additions and 19 deletions

View File

@ -964,18 +964,8 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
{ {
sf_set_pir_statu_flag(0); sf_set_pir_statu_flag(0);
sf_set_module_sleep_flag(0); sf_set_module_sleep_flag(0);
if((PWR_ON_SETUP != sf_poweron_type_get()) && (PWR_ON_USB!= sf_poweron_type_get()))
{
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
sf_set_power_off_flag(1);
//sf_app_battery_stop();
system("watchdog -T 1 -t 5 /dev/watchdog");
}
else
{
sf_com_message_send_to_cardv(&stMessageBuf); sf_com_message_send_to_cardv(&stMessageBuf);
} }
}
else if(0 == stMessageBuf.arg3) //ON->OFF else if(0 == stMessageBuf.arg3) //ON->OFF
{ {
UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get(); UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();

View File

@ -804,16 +804,9 @@ void sf_mcu_dataready_ck(UINT8 startMode)
gModuleSleep = 0; //power off 4G module gModuleSleep = 0; //power off 4G module
sf_set_power_off_flag(1); sf_set_power_off_flag(1);
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__); printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
if((startMode == 1) && (PWR_ON_AUTO == sf_cardv_convert_power_on_mode()))
{
system("watchdog -T 1 -t 5 /dev/watchdog");
}
else
{
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
} }
} }
}
#endif #endif
} }