#define __MMI_CUSTOM_HENG_AI__
#ifdef __MMI_CUSTOM_HENG_AI__
#define __MMI_REMIND_WAKE_UP_SUPPORT__
+#define __MMI_SLEEP_FUNCTION_SUPPORT__
#endif
mmi_remind_mission_check(cur_time);
// check sleep time
+ #ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
mmi_watch_sleep_time_mission_check();
-
+ #endif
case MMI_MODEM_OPERATOR_IND:
#if USE_LV_WATCH_ALIPAY != 0
//int32_t rst = aos_start_simcard_identify();
- printf("aos_start_simcard_identify rst=%d\n", aos_start_simcard_identify());
+ //printf("aos_start_simcard_identify rst=%d\n", aos_start_simcard_identify());
#endif
watch_modem_operator_ind(((mmi_msg_operator_ind_t *)msg)->rat);
lv_mem_free(((mmi_msg_operator_ind_t *)msg)->Operator);
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
#define NV_SECTION_UI_DO_NOT_DISTURB_LEN (sizeof(nv_watch_do_not_disturb_t))
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
#define NV_SECTION_UI_SLEEP_TIME_DATA_LEN (sizeof(nv_watch_sleep_time_t))
+#endif
#define NV_SECTION_UI_DIAL_PAD_SWITCH_LEN (sizeof(nv_watch_switch_t))
#define NV_SECTION_UI_WHITE_LIST_SWITCH_LEN (sizeof(nv_watch_switch_t))
#define NV_SECTION_UI_MAIN_MENU_STYLE_LEN (sizeof(nv_watch_main_menu_style_t))
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
#define NV_SECTION_UI_DO_NOT_DISTURB_FILE "ui_do_not_disturb.nv"
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
#define NV_SECTION_UI_SLEEP_TIME_DATA_FILE "ui_sleep_time_data.nv"
+#endif
#define NV_SECTION_UI_DIAL_PAD_SWITCH_FILE "ui_dial_pad_switch.nv"
#define NV_SECTION_UI_WHITE_LIST_SWITCH_FILE "ui_white_list_switch.nv"
#define NV_SECTION_UI_MAIN_MENU_STYLE_FILE "ui_main_menu_style.nv"
case NV_SECTION_UI_DO_NOT_DISTURB:
return (NV_SECTION_LEN(NV_SECTION_UI_DO_NOT_DISTURB));
#endif
+ #ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
case NV_SECTION_UI_SLEEP_TIME_DATA:
return (NV_SECTION_LEN(NV_SECTION_UI_SLEEP_TIME_DATA));
+ #endif
case NV_SECTION_UI_DIAL_PAD_SWITCH:
return (NV_SECTION_LEN(NV_SECTION_UI_DIAL_PAD_SWITCH));
case NV_SECTION_UI_WHITE_LIST_SWITCH:
case NV_SECTION_UI_DO_NOT_DISTURB:
return (NV_SECTION_FILE_PATH(NV_SECTION_UI_DO_NOT_DISTURB));
#endif
+ #ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
case NV_SECTION_UI_SLEEP_TIME_DATA:
return (NV_SECTION_FILE_PATH(NV_SECTION_UI_SLEEP_TIME_DATA));
+ #endif
case NV_SECTION_UI_DIAL_PAD_SWITCH:
return (NV_SECTION_FILE_PATH(NV_SECTION_UI_DIAL_PAD_SWITCH));
case NV_SECTION_UI_WHITE_LIST_SWITCH:
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
nv_watch_do_not_disturb_t * do_not_disturb;
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
nv_watch_sleep_time_t * sleep_time_data;
+#endif
nv_watch_switch_t * mmi_switch_data;
nv_watch_main_menu_style_t * main_menu_style;
#ifdef __MMI_ZHSX_SUPPORT_CHECK_SIM_UNBIND__
break;
#endif
+ #ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
case NV_SECTION_UI_SLEEP_TIME_DATA:
sleep_time_data = lv_mem_alloc(SectionLen);
memset(sleep_time_data, 0x0, SectionLen);
TempData = (char *)sleep_time_data;
break;
+ #endif
case NV_SECTION_UI_DIAL_PAD_SWITCH:
mmi_switch_data = lv_mem_alloc(SectionLen);
} __packed nv_watch_do_not_disturb_t;
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
typedef struct
{
uint8_t on_off; // 1: on, 0: off
uint8_t end_hour; // [0, 23]
uint8_t end_min; // [0, 59]
} __packed nv_watch_sleep_time_t;
+#endif
typedef struct
{
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
NV_SECTION_UI_DO_NOT_DISTURB, // nv_watch_do_not_disturb_t
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
NV_SECTION_UI_SLEEP_TIME_DATA, // nv_watch_sleep_time_t
+#endif
NV_SECTION_UI_DIAL_PAD_SWITCH, // nv_watch_switch_t
NV_SECTION_UI_WHITE_LIST_SWITCH, // nv_watch_switch_t
NV_SECTION_UI_MAIN_MENU_STYLE, // nv_watch_main_menu_style_t
case MCI_EVENT_EOS:
lv_label_set_text_id(ext_fac->label_key_state, WATCH_TEXT_ID_MICPHONE_RECORD_CHECK);
Hal_Record_Buffer_Stop_Req(&ext_fac->buffer_size, &duration_ms);
- Hal_Tone_Play_Onetime((uint32_t *)ext_fac->buffer, ext_fac->buffer_size, query_current_volume(), micphone_record_play_over_cb, ext_fac);
+ Hal_Tone_Play_Onetime((uint32_t *)ext_fac->buffer, ext_fac->buffer_size, HAL_AUDIO_SPK_LEVEL_MAX/*query_current_volume()*/, micphone_record_play_over_cb, ext_fac);
break;
case MCI_EVENT_ERROR:
/*recoder stop if value is - 996*/
} else if(num == AUTOTEST_SPEAKER) {
lv_obj_t * label_tip = lv_obj_get_child(btn, NULL);
// play tone
- Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL, query_current_volume(), NULL, NULL);
+ Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL, HAL_AUDIO_SPK_LEVEL_MAX/*query_current_volume()*/, NULL, NULL);
lv_label_set_text_id(label_tip, WATCH_TEXT_ID_STOP_TEST);
lv_obj_set_event_cb(btn, autotest_stoptest_btn_event_cb);
}
//watch_set_suspend_enable(false, ACT_ID_FACTORY_MODE_TEST, 0);
- Hal_NFFS_File_Play_Repeat(AUDIO_INCOMING_CALL, HAL_AUDIO_SPK_LEVEL_9/*query_current_volume()*/);
+ Hal_NFFS_File_Play_Repeat(AUDIO_INCOMING_CALL, HAL_AUDIO_SPK_LEVEL_MAX/*query_current_volume()*/);
factorymode_agetest_create(NULL);
}
#elif USE_LV_WATCH_UI_240_240_CIRCLE
#define MMI_VC_RING_OFF_BTN_Y_OFFSET (-15)
-#define MMI_VC_INCOMING_RING_OFF_BTN_X_OFFSET (20)
-#define MMI_VC_INCOMING_HOOK_BTN_X_OFFSET (-20)
+#define MMI_VC_INCOMING_RING_OFF_BTN_X_OFFSET (20+20)
+#define MMI_VC_INCOMING_HOOK_BTN_X_OFFSET (-20-20)
-#define MMI_VC_CALLING_RING_OFF_BTN_X_OFFSET (-20)
-#define MMI_VC_CALLING_VOLUME_BTN_X_OFFSET (20)
+#define MMI_VC_CALLING_RING_OFF_BTN_X_OFFSET (-20-20)
+#define MMI_VC_CALLING_VOLUME_BTN_X_OFFSET (20+20)
#else
#define MMI_VC_RING_OFF_BTN_Y_OFFSET (-30)
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
mmi_watch_do_not_disturb_mission_check();
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
mmi_watch_sleep_time_nv_read();
+#endif
mmi_dial_pad_switch_nv_read();
mmi_white_list_switch_nv_read();
#ifdef __MMI_ZHSX_SUPPORT_CHECK_SIM_UNBIND__
}
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
// [*SLEEPTIME,21:30-6:10] [*SLEEPTIME,]
bool mmi_protocol_fzd_parse_SERVER_SET_SLEEPTIME(unsigned char * next_buff, unsigned int next_buff_len)
{
return result;
}
+#endif
bool mmi_protocol_fzd_parse_SERVER_SET_DIAL_PAD_SWITCH(unsigned char * next_buff, unsigned int next_buff_len)
{
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
MMI_FZD_SERVER_SET_NOT_DISTURB,
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
MMI_FZD_SERVER_SET_SLEEPTIME,
+#endif
MMI_FZD_SERVER_SET_DIAL_PAD_SWITCH,
MMI_FZD_SERVER_SET_WHITE_LIST_SWITCH,
#ifdef __MMI_REMIND_WAKE_UP_SUPPORT__
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
{MMI_FZD_SERVER_SET_NOT_DISTURB, "SILENCETIME2"},
#endif
+ #ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
{MMI_FZD_SERVER_SET_SLEEPTIME, "SLEEPTIME"},
+ #endif
{MMI_FZD_SERVER_SET_DIAL_PAD_SWITCH, "KEYBRD"},
{MMI_FZD_SERVER_SET_WHITE_LIST_SWITCH, "WLKEY"},
#ifdef __MMI_REMIND_WAKE_UP_SUPPORT__
break;
#endif
+ #ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
case MMI_FZD_SERVER_SET_SLEEPTIME:
mmi_protocol_fzd_parse_SERVER_SET_SLEEPTIME(next_buff, next_buff_len);
break;
+ #endif
case MMI_FZD_SERVER_SET_DIAL_PAD_SWITCH:
mmi_protocol_fzd_parse_SERVER_SET_DIAL_PAD_SWITCH(next_buff, next_buff_len);
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
static nv_watch_sleep_time_t s_sleep_time_data = {0};
static uint8_t s_sleep_mission_in_progress = 0;
}
}
}
+#endif
#ifdef __MMI_ZHSX_SUPPORT_CHECK_SIM_UNBIND__
void mmi_watch_do_not_disturb_mission_check(void);
#endif
+#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
void mmi_watch_sleep_time_nv_read(void);
void mmi_watch_sleep_time_data_set(nv_watch_sleep_time_t * data);
void mmi_watch_sleep_time_mission_check(void);
+#endif
#ifdef __MMI_ZHSX_SUPPORT_CHECK_SIM_UNBIND__
void mmi_watch_sim_unbind_switch_nv_read(void);