Fixed wifi and bluetooth status show bug.

This commit is contained in:
xiaojiazhu 2023-11-03 19:37:38 +08:00
parent 57fea3c641
commit 576b10ede1
2 changed files with 21 additions and 17 deletions

View File

@ -486,20 +486,21 @@ static void update_camera_message(void)
static void update_wifi(void)
{
// SF_WIFI_OK = 0x01,/*wifi start success*/
// SF_WIFI_CON, /*wifi has been connected*/
// SF_WIFI_FAIL, /*wifi start fail*/
// SF_WIFI_BUTT,
const int EMPTY_IMAGE = 0;
SF_WIFI_STATUS_E status = sf_get_wifi_status();
lv_plugin_res_id res[] = {
EMPTY_IMAGE,
LV_PLUGIN_IMG_ID_SF_WIFI_UNCONNECTED,
LV_PLUGIN_IMG_ID_SF_WIFI_UNSUPPORT,
LV_PLUGIN_IMG_ID_SF_WIFI_CONNECTED,
LV_PLUGIN_IMG_ID_SF_WIFI_UNSUPPORT
LV_PLUGIN_IMG_ID_SF_WIFI_UNCONNECTED
};
const int WIFI_NOT_INIT = 0;
const int WIFI_UNCONNECTED = 1;
const int WIFI_UNSUPPORT = 3;
if (WIFI_NOT_INIT == status
|| status < WIFI_UNCONNECTED
|| status > WIFI_UNSUPPORT)
if (SF_WIFI_BUTT == status
|| status < SF_WIFI_OK
|| status > SF_WIFI_FAIL)
{
lv_obj_set_hidden(image_wifi_connected_scr_uiflowphoto, true);
return;
@ -511,20 +512,21 @@ static void update_wifi(void)
static void update_bluetooth(void)
{
// SF_BLE_OK = 0x01,/*BLE start success*/
// SF_BLE_CON, /*BLE has been connected*/
// SF_BLE_FAIL, /*BLE start fail*/
// SF_BLE_BUTT,
const int EMPTY_IMAGE = 0;
SF_WIFI_STATUS_E status = sf_get_wifi_status();
SF_BLE_STATUS_E status = sf_get_ble_status();
lv_plugin_res_id res[] = {
EMPTY_IMAGE,
LV_PLUGIN_IMG_ID_SF_BLUETOOTH_UNCONNECTED,
LV_PLUGIN_IMG_ID_SF_BLUETOOTH_UNSUPPORT,
LV_PLUGIN_IMG_ID_SF_BLUETOOTH_CONNECTED,
LV_PLUGIN_IMG_ID_SF_BLUETOOTH_UNSUPPORT
LV_PLUGIN_IMG_ID_SF_BLUETOOTH_UNCONNECTED
};
const int WIFI_NOT_INIT = 0;
const int WIFI_UNCONNECTED = 1;
const int WIFI_UNSUPPORT = 3;
if (WIFI_NOT_INIT == status
|| status < WIFI_UNCONNECTED
|| status > WIFI_UNSUPPORT)
if (SF_BLE_BUTT == status
|| status < SF_BLE_OK
|| status > SF_BLE_FAIL)
{
lv_obj_set_hidden(image_bluetooth_connected_scr_uiflowphoto, true);
return;

View File

@ -1706,6 +1706,8 @@ static SINT32 sf_cardv_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
sf_cardv_para_signaling_start();
break;
case SF_PARA_CMD_BLE:
sf_set_ble_status(pMessageBuf->arg2);
break;
case SF_PARA_CMD_SIMISINSERT:
sf_cardv_set_sim_insert(pMessageBuf->arg2);