From 27c78b3431a38878b8c8b1b81c79694cea4a2bcf Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期四, 23 七月 2020 10:07:51 +0800
Subject: [PATCH] 20200723
---
lib/src/main/cpp/test_items2/dummy_light.cpp | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/lib/src/main/cpp/test_items2/dummy_light.cpp b/lib/src/main/cpp/test_items2/dummy_light.cpp
index 56aaa05..124a03f 100644
--- a/lib/src/main/cpp/test_items2/dummy_light.cpp
+++ b/lib/src/main/cpp/test_items2/dummy_light.cpp
@@ -38,16 +38,20 @@
content = ptr;
contentNum = num;
- currRtkTime = *rtkTime;
+ if (content != NULL && num > 0) {
+ currRtkTime = *rtkTime;
- for (int i = 0; i < contentNum; ++i) {
- content[i].itemStatus = TTS_NOT_START;
+ for (int i = 0; i < contentNum; ++i) {
+ content[i].itemStatus = TTS_NOT_START;
+ }
+ testing = true;
+
+ AppTimer_delete(DummyLightCheckActive);
+ AppTimer_delete(ExamDummyLight);
+ AppTimer_add(ExamDummyLight, D_SEC(2));
+ } else {
+ testing = false;
}
- testing = true;
-
- AppTimer_delete(DummyLightCheckActive);
- AppTimer_delete(ExamDummyLight);
- AppTimer_add(ExamDummyLight, D_SEC(2));
}
int ExecuteDummyLightExam(const struct RtkTime* rtkTime)
--
Gitblit v1.8.0