* INCLUDES
*********************/
#include "my_xMotion.h"
-#include "lv_drv_conf_CUSTOM.h"
+#include "lv_drv_conf.h"
#if USE_MY_XMOTION
#include <stdio.h>
#define ACC_0G_X 4096//8192 //4096
#define ACC_0G_Y 4096//8192
#define ACC_0G_Z 4096//8192
-#define FALL_DETECH_LOW_THRESHOLD 35
-#define FALL_COUNTER_THRESHOLD 7
+#define FALL_DETECH_LOW_THRESHOLD MMI_FALL_DETECT_THRESHOLD_DEFAULT // 35
+#define FALL_COUNTER_THRESHOLD MMI_FALL_COUNTER_THRESHOLD_DEFAULT //7
typedef struct
{
float x;
nv_watch_vc_contact_t t_vc_contact = {0};
char temp_buffer[4] = {0};
char * temp_ptr = next_buff;
- uint8_t i = 0;
- uint8_t t_len = 0;
+ uint16_t i = 0;
+ uint16_t t_len = 0;
char t_content_buffer[NV_WATCH_VC_CONTACT_NUMBER_LEN] = {0};
- uint8_t t_next = 0, t_current = 0;
- uint8_t t_offset = 0;
+ uint16_t t_next = 0, t_current = 0;
+ uint16_t t_offset = 0;
while((NULL != temp_ptr) && (i < next_buff_len))
{
}
else if(1 == t_current) // name
{
- PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+ //PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: %d\n", __FUNCTION__, __LINE__, t_offset);
memset(t_content_buffer, 0x0, sizeof(t_content_buffer));
mmi_unicode_hex_str_to_utf8_str(temp_ptr, t_offset, t_content_buffer, &t_len);
}
else // user id
{
- PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+ //PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: %d\n", __FUNCTION__, __LINE__, t_offset);
memset(t_content_buffer, 0x0, sizeof(t_content_buffer));
mmi_unicode_hex_str_to_utf8_str(temp_ptr, t_offset, t_content_buffer, &t_len);
bool result = false;
MMI_PROTOCOL_FZD_ACTION_ENUM action = MMI_FZD_WATCH_VC_CALL_RESPONSE;
- if(NULL == number) // hang up
- {
- result = mmi_protocol_fzd_send_without_data(action);
- }
- else // reject
- {
- unsigned char content_buff[NV_WATCH_VC_CONTACT_NUMBER_LEN + 64 + 8] = {0};
- unsigned int content_lenth = 0;
+ unsigned char content_buff[NV_WATCH_VC_CONTACT_NUMBER_LEN + 64 + 8] = {0};
+ unsigned int content_lenth = 0;
sprintf(content_buff, ",%s,%s,%d", number, ticket, type);
content_lenth = strlen(content_buff);
- result = mmi_protocol_fzd_send_with_data(action, content_buff, content_lenth);
- }
+ result = mmi_protocol_fzd_send_with_data(action, content_buff, content_lenth);
+
return result;
}
#endif