UIImageView *imageLine11 = nullptr;
UIImageView *imageLine12 = nullptr;
+ UICanvas *canvas = nullptr;
+
bool viewiInitStatus{false};
std::vector<TrackSegment> trackSegments_;
exitLabel = nullptr;
}
+ if (canvas) {
+ delete canvas;
+ canvas = nullptr;
+ }
+
if (scrollView_) {
delete scrollView_;
scrollView_ = nullptr;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Stride length set: %s\r\n",
strideStr.c_str()); // 打印步幅
}
-
+#if defined(BOARD_W9) || defined(BOARD_N9)
//读取一下gps文件
std::string gpsFilePath =
TraingModel::GetInstance()->GetCanvasDataPath(enddata->starttime);
return;
}
}
+#endif
}
-
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
"TraingEnddataView data initialization complete.\r\n");
}
container_->SetOnDragListener(presenter_);
SetKeyActListener();
-
+#if defined(BOARD_W9) || defined(BOARD_N9)
///////////////////////////gps轨迹测试//////////////////////
- UICanvas *canvas = new UICanvas();
+ canvas = new UICanvas();
canvas->SetHeight(CANVAS_SIZE);
canvas->SetWidth(CANVAS_SIZE);
canvas->SetPosition(33, 100);
GenerateTrackPoints();
DrawTrackSegment(canvas);
DrawMarkers(canvas);
+#endif
}
void TraingEnddataView::OnSetUpView() {
}\r
\r
if (TimeStr.empty()) {\r
- WEARABLE_LOGE( WEARABLE_LOG_MODULE_APP,"TraingModel::GetInstance()->DisplayMotionDuration() nullptr");\r
+ WEARABLE_LOGE(\r
+ WEARABLE_LOG_MODULE_APP,\r
+ "TraingModel::GetInstance()->DisplayMotionDuration() nullptr");\r
return;\r
}\r
if (TrainingControlView::GetInstance()->GetTimeLabel() != nullptr) {\r
TrainingControlView::GetInstance()->GetTimeLabel()->SetText(\r
TimeStr.c_str());\r
}\r
- if(TrainingControlView::GetInstance()->GetGpsStatusLabel() != nullptr) {\r
+#if defined(BOARD_W9) || defined(BOARD_N9)\r
+ if (TrainingControlView::GetInstance()->GetGpsStatusLabel() != nullptr) {\r
//获取GPS状态\r
bool gpsStatus = TraingModel::GetInstance()->GetGPSConnectState();\r
std::string gpsStatusStr;\r
}\r
TrainingControlView::GetInstance()->GetGpsStatusLabel()->SetText(gpsStatusStr.c_str());\r
}\r
+#endif\r
}\r
void TraingCardPresenter::UpdateTimeOfData() {\r
std ::string TimeStr = TraingModel::GetInstance()->DisplayMotionDuration();\r
#include "common/image_cache_manager.h"
#include "components/ui_button.h"
#include "components/ui_label_ext.h"
+#include "languagecode/LanguageInit.h"
#include "string"
#include "traing/Training_UiConfig.h"
#include "traing/include/TraingModel.h"
#include <chrono>
#include <thread>
#include <ui_scroll_view.h>
-#include "languagecode/LanguageInit.h"
namespace OHOS {
static TrainingControlView *g_pTrainingControlView{nullptr};
labelstop->SetTextId(STR_PAUSE);
}
- InitLabel(gpsstatus, 83, 365, 300, 35, "label1", "gps:定位中...",
- DEFAULT_VECTOR_FONT_FILENAME, 30);
- gpsstatus->SetTextColor(Color::Red());
-
// 添加到视图中
Add(labeltitle);
Add(labeltimer);
Add(labelend);
Add(labelstop);
- Add(gpsstatus);
// 初始化 Image
InitImageView(imagepoint, 193, 421, 80, 20, "image1", CONTROL_POINT_IMAGE);
Add(imagepoint);
+
+#if defined(BOARD_W9) || defined(BOARD_N9)
+ InitLabel(gpsstatus, 83, 365, 300, 35, "label1", "gps:定位中...",
+ DEFAULT_VECTOR_FONT_FILENAME, 30);
+ gpsstatus->SetTextColor(Color::Red());
+ Add(gpsstatus);
+#endif
}
UILabelExt *TrainingControlView::GetLabel() { return labelstop; }
delete labelstop;
labelstop = nullptr;
}
- if(gpsstatus != nullptr) {
+ if (gpsstatus != nullptr) {
delete gpsstatus;
gpsstatus = nullptr;
}