#include "custom_runtime.h"
#include "custom_utils.h"
-// #include "safemodemanager/include/SafeModeManagerModelC.h"
+#include "safemodemanager/include/SafeModeManagerModelC.h"
namespace OHOS {
extern "C" {
if (uapi_dev_runtime_get_bloodoxygen_storage_status()) {
// printf("save_blood_oxygen_data is reading\n");
//进行延迟
- LOS_Msleep(100);
+ // LOS_Msleep(100);
if (uapi_dev_runtime_get_bloodoxygen_storage_status()) {
// printf("save_blood_oxygen_data is reading again\n");
//重新发送该消息
if (uapi_dev_runtime_get_heartrate_storage_status()) {
// printf("save_heart_rate_data is reading\n");
//进行延迟
- LOS_Msleep(100);
+ // LOS_Msleep(100);
if (uapi_dev_runtime_get_heartrate_storage_status()) {
// printf("save_heart_rate_data is reading again\n");
//重新发送该消息
#include "cmsis_os.h"
#include "custom_utils.h"
-// #include "safemodemanager/include/SafeModeManagerModelC.h"
+#include "safemodemanager/include/SafeModeManagerModelC.h"
#include "thread_adapter.h"
#include "traing/training_card/include/TraingCardPresenter.h"
#endif
void store_sport_data() {
- // printf("运动数据存储!\r\n");
+ printf("运动数据存储!\r\n");
OHOS::TraingModel::GetInstance()->RecordSportData();
return;
}
return;
// 不同的运动类型解析不同的数据
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,
"AnalysisData:[steps %d, distance %d,calories %d, pace %d, "
"step_frequency %d, step_length %d]",
cyweeInfo->steps, cyweeInfo->distance, cyweeInfo->calories,
return;
}
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[apc:%d fpc:%d cdc:%d std:%d]",
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[apc:%d fpc:%d cdc:%d std:%d]",
cyweeInfo->avg_pace, cyweeInfo->max_pace,
cyweeInfo->avg_step_freq, cyweeInfo->avg_step_len);
//平均配速
do_custom_fileoperate_service_check_msg(
CUSTOM_FILEOPERATE_MSG_TYPE_SPORTDATA_SAVE, nullptr, 0);
+ // store_sport_data();
+
Startstate = false;
Endstate = true;
sportTag_ = 0;
sportTagType_ = ExerciseTag::UNKNOW;
#endif
+#ifdef BLE_SERVER_ENABLE
/*运动结束并且是手表发起的运动*/
if (Openingway == false) {
-#ifdef BLE_SERVER_ENABLE
sendtraningstateend();
-#endif
}
/*运动结束并且是app发起的运动*/
else {
-#ifdef BLE_SERVER_ENABLE
sendtraningstatedata(0, sportdata->duration);
-#endif
}
-
+#endif
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "结束运动");
}
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "paceCount = %d", paceCount);
- std::string filePath =
- TRAINING_PACE_FILE + std::to_string(sportdata->starttime) + ".bin";
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SavePaceTable filePath: %s",
- filePath.c_str());
+ std::string filePath = TRAINING_PACE_FILE + std::to_string(sportdata->starttime) + ".bin";
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SavePaceTable filePath: %s", filePath.c_str());
std::ofstream paceFile(filePath, std::ios::binary);
if (!paceFile) {
#include "safemodemanager/include/SafeModeManagerModelC.h"
#include "sleep/include/SleepModelC.h"
#include "player/include/PlayersModelC.h"
-#include "system/include/SystemLogModelC.h"
-
#else
+#include "system/include/SystemLogModelC.h"
#ifdef __cplusplus
extern "C"
{
#endif
-
#ifdef FACTORYTEST_SERVICE
#include "factorytest_protocol.h"
#endif
-
#ifdef SUPPORT_CYWEE_SERVICE
#include "cywee_data.h"
#endif
//进行修复开始
void repair_file_start(void){}
-//进行运动存储
-void store_sport_data(void){}
-//进行心率存储
-// void save_heart_rate_data(void){}
-//进行血氧存储
-// void save_blood_oxygen_data(void){}
-//进行心率列表存储
+
void custom_save_sleep_data(void){}
void custom_save_nap_data(void){}
//void custom_read_sleep_data(void){}
#ifdef SUPPORT_TCPIP
#include "lwip/tcpip.h"
#endif
-
+#include "system/include/SystemLogModelC.h"
#ifdef FD230_COMPONENT
#include "soundandvibration/include/SoundAndVibrationVolumeSettingC.h"
#include "networkandcall/include/NetworkAndCallC.h"
#include "producttest/include/testTPC.h"
#include "system/include/SystemPresenterC.h"
#include "producttest/include/testPresenterC.h"
-#include "system/include/SystemLogModelC.h"
#include "ConfigModelC.h"
#else
// void ble_SOS_data_init(void){}