From b73f32bc8ad86a7bb5f0739ac0fd7aa4c04cce98 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期三, 25 三月 2020 19:00:06 +0800
Subject: [PATCH] 加减档
---
lib/src/main/cpp/test_items/turn_a90.cpp | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/lib/src/main/cpp/test_items/turn_a90.cpp b/lib/src/main/cpp/test_items/turn_a90.cpp
index fa753ac..6ee18df 100644
--- a/lib/src/main/cpp/test_items/turn_a90.cpp
+++ b/lib/src/main/cpp/test_items/turn_a90.cpp
@@ -9,6 +9,7 @@
#include "../jni_log.h"
#include "../utils/xconvert.h"
#include "../defs.h"
+#include "../test_common/car_sensor.h"
#include <vector>
#include <cstdlib>
@@ -96,14 +97,20 @@
if (az >= 30) {
if (!turnLeftFinished) {
+ char turn_direct;
if((( ((int)heading) + 360 - enterAreaHeading) % 360) < 180) {
DEBUG("鍙宠浆");
+ turn_direct = 'R';
} else {
DEBUG("宸﹁浆");
+ turn_direct = 'L';
}
// 杞悜鐏湭寮�鍚紝鎵�10鍒�
- AddExamFault(30, rtkTime);
- DEBUG("杞悜鐏湭寮�鍚�");
+ if ((turn_direct == 'R' && ReadCarStatus(TURN_SIGNAL_LAMP) != RIGHT_TURN_LIGHT) ||
+ (turn_direct == 'L' && ReadCarStatus(TURN_SIGNAL_LAMP) != LEFT_TURN_LIGHT)) {
+ DEBUG("杞悜鐏湭寮�鍚�");
+ AddExamFault(30, rtkTime);
+ }
}
turnLeftFinished = true;
}
--
Gitblit v1.8.0