t_high_value = 120 + rand() % 100;
t_low_value = 60 + rand() % 50;
+#else
+ mmi_hsensor_blood_value_get(&t_high_value, &t_low_value);
+#endif
+
if(180 < t_high_value)
t_high_value = 180;
else if(120 > t_high_value)
t_low_value = 120;
else if(60 > t_low_value)
t_low_value = 60;
-
-#else
- mmi_hsensor_blood_value_get(&t_high_value, &t_low_value);
-#endif
-
+
* blood_high_value = t_high_value;
* blood_low_value = t_low_value;
#ifdef __HEALTH_MEASURE_FAKE_DATA__
srand(Hal_Timer_Get_Counter());
t_value = 95 + rand() % 6;
- if(100 < t_value)
- t_value = 100;
- else if(95 > t_value)
- t_value = 95;
#else
mmi_hsensor_spo2_value_get(&t_value);
#endif
+ if(100 < t_value)
+ t_value = 100;
+ else if(95 > t_value)
+ t_value = 95;
+
* spo2_value = t_value;
return true;
#ifdef __MMI_ZHSX_SUPPORT__
#if USE_GPS
-#include "../../../../product/craneg_modem/hal/gps_device/inc/gpsnmeaapi.h"
+//#include "../../../../product/craneg_modem/hal/gps_device/inc/gpsnmeaapi.h"
+#include "../../../product/craneg_modem/hal/gps_device/inc/gpsnmeaapi.h"
#endif
-#include "../../modem/mmi_modem_tcp/wifi_scan_task.h"
+#include "../modem/mmi_modem_tcp/wifi_scan_task.h"
static uint8_t s_watch_location_state = 0; // 0-init; 1-locating
wifi_scan_destroy();
}
+static uint8_t HexStr2Int(char *str_hex, uint8_t str_hex_len)
+{
+ uint8_t int_value = 0;
+ uint8_t i = 0, t_value = 0;
+ char t_char = 0;
+
+ if(NULL == str_hex || 0 == str_hex_len)
+ return 0;
+
+ for(i = 0; i < str_hex_len; i++)
+ {
+ t_char = str_hex[i];
+ if('a' <= t_char && 'z' >= t_char)
+ {
+ t_char = t_char - 'a' + 'A';
+ }
+
+ t_value = ('A' <= t_char) ? (t_char - 'A' + 10) : (t_char - '0');
+ int_value = int_value * 16 + t_value;
+ }
+
+ return int_value;
+}
+
void mmi_watch_location_wifi_scan_cb(WIFI_SCAN_ID_DEF msgid, WifiInfoT *wifi_info)
{
//if(WIFI_SCAN_MSG_COMPLETE == msgid)
uint8_t i = 0;
for(i = 0; i < s_watch_location_data.wifi_data.count; i++)
{
- _lv_memcpy(&(s_watch_location_data.wifi_data.item[i]), wifi_info->WifiHotspot[i], sizeof(app_adp_wifi_ap_item));
+ s_watch_location_data.wifi_data.item[i].rssi = wifi_info->WifiHotspot[i].Rssi;
+
+ uint8_t j = 0;
+ for(j = 0; j < APP_ADP_WIFI_MAC_LEN; j++)
+ {
+ s_watch_location_data.wifi_data.item[i].mac[j] = HexStr2Int(wifi_info->WifiHotspot[i].MacAddr[j * 2], 2);
+ }
}
}
else