//uint8_t media_volume;
//uint8_t power_on_off_volume;
uint8_t white_list_switch;
+ uint8_t timing_location_switch;
uint8_t dial_pad_switch;
uint8_t low_battery_switch;
uint8_t fall_down_switch;
void mmi_watch_setting_ext_data_nv_default(nv_watch_setting_ext_t * watch_settings)
{
watch_settings->white_list_switch = MMI_WHITE_LIST_SWITCH_DEFAULT;
+ watch_settings->timing_location_switch = MMI_TIMING_LOCATION_SWITCH_DEFAULT;
watch_settings->dial_pad_switch = MMI_DIAL_PAD_SWITCH_DEFAULT;
watch_settings->low_battery_switch = MMI_LOW_BATTERY_SWITCH_DEFAULT;
watch_settings->fall_down_switch = MMI_FALL_DOWN_SWITCH_DEFAULT;
}
}
+// 0-close; 1-open
+uint8_t mmi_timing_location_switch_get(void)
+{
+ return (s_watch_setting_ext_value.timing_location_switch);
+}
+
+void mmi_timing_location_switch_set(uint8_t value)
+{
+ if(0 == value || 1 == value)
+ {
+ s_watch_setting_ext_value.timing_location_switch = value;
+ mmi_watch_setting_ext_data_nv_write();
+ }
+}
+
// 0-close; 1-open
uint8_t mmi_dial_pad_switch_get(void)
{
uint8_t mmi_white_list_switch_get(void);
void mmi_white_list_switch_set(uint8_t value);
+uint8_t mmi_timing_location_switch_get(void);
+void mmi_timing_location_switch_set(uint8_t value);
+
uint8_t mmi_dial_pad_switch_get(void);
void mmi_dial_pad_switch_set(uint8_t value);
#define MMI_PEDOMETER_STEP_GOAL_DEFAULT (10000)
#endif
+// timing location
+#ifdef MMI_CUSTOMER_TIMING_LOCATION_SWITCH
+#define MMI_TIMING_LOCATION_SWITCH_DEFAULT MMI_CUSTOMER_TIMING_LOCATION_SWITCH
+#else
+#define MMI_TIMING_LOCATION_SWITCH_DEFAULT (MMI_WATCH_SWITCH_ON) // 0-close; 1-open
+#endif
+
// dial pad
#ifdef MMI_CUSTOMER_DIAL_PAD_SWITCH
#define MMI_DIAL_PAD_SWITCH_DEFAULT MMI_CUSTOMER_DIAL_PAD_SWITCH
bool mmi_protocol_action_location(void)
{
+ if(0 == mmi_timing_location_switch_get())
+ return false;
+
mmi_watch_location_mission_timed_location_action();
return true;
}
}
#endif
+// 0-off; 1-on
+bool mmi_protocol_fzd_parse_SERVER_SET_UD_SWITCH(unsigned char * next_buff, unsigned int next_buff_len)
+{
+ bool result = false;
+ MMI_PROTOCOL_FZD_ACTION_ENUM action = MMI_FZD_SERVER_SET_UD_SWITCH;
+
+ if(NULL == next_buff || 0 == next_buff_len)
+ {
+ PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+ return false;
+ }
+
+ result = true;
+ mmi_protocol_fzd_send_without_data(action);
+
+ uint32_t value = atoi(next_buff);
+ mmi_timing_location_switch_set(value);
+
+ return result;
+}
+
bool mmi_protocol_fzd_parse_SERVER_SET_DIAL_PAD_SWITCH(unsigned char * next_buff, unsigned int next_buff_len)
{
bool result = false;
#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
MMI_FZD_SERVER_SET_SLEEPTIME,
#endif
+ MMI_FZD_SERVER_SET_UD_SWITCH,
MMI_FZD_SERVER_SET_DIAL_PAD_SWITCH,
MMI_FZD_SERVER_SET_WHITE_LIST_SWITCH,
MMI_FZD_SERVER_SET_LOW_BATTERY_SWITCH,
#ifdef __MMI_ZHSX_SUPPORT_DO_NOT_DISTURB__
bool mmi_protocol_fzd_parse_SERVER_SET_NOT_DISTURB(unsigned char * next_buff, unsigned int next_buff_len);
#endif
+bool mmi_protocol_fzd_parse_SERVER_SET_UD_SWITCH(unsigned char * next_buff, unsigned int next_buff_len);
bool mmi_protocol_fzd_parse_SERVER_SET_DIAL_PAD_SWITCH(unsigned char * next_buff, unsigned int next_buff_len);
bool mmi_protocol_fzd_parse_SERVER_SET_WHITE_LIST_SWITCH(unsigned char * next_buff, unsigned int next_buff_len);
bool mmi_protocol_fzd_parse_SERVER_SET_LOW_BATTERY_SWITCH(unsigned char * next_buff, unsigned int next_buff_len);
#ifdef __MMI_SLEEP_FUNCTION_SUPPORT__
{MMI_FZD_SERVER_SET_SLEEPTIME, "SLEEPTIME"},
#endif
+ {MMI_FZD_SERVER_SET_UD_SWITCH, "LOC_SWITCH"},
{MMI_FZD_SERVER_SET_DIAL_PAD_SWITCH, "KEYBRD"},
{MMI_FZD_SERVER_SET_WHITE_LIST_SWITCH, "WLKEY"},
{MMI_FZD_SERVER_SET_LOW_BATTERY_SWITCH, "LOWBAT"},
break;
#endif
+ case MMI_FZD_SERVER_SET_UD_SWITCH:
+ mmi_protocol_fzd_parse_SERVER_SET_UD_SWITCH(next_buff, next_buff_len);
+ break;
+
case MMI_FZD_SERVER_SET_DIAL_PAD_SWITCH:
mmi_protocol_fzd_parse_SERVER_SET_DIAL_PAD_SWITCH(next_buff, next_buff_len);
break;