yy1717
2020-03-25 b73f32bc8ad86a7bb5f0739ac0fd7aa4c04cce98
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;
    }