yy1717
2020-01-22 eb645b6bf08ec50459c737821e63ee20dea4486d
lib/src/main/cpp/test_items/park_bottom.cpp
@@ -83,6 +83,7 @@
        // 是否超时
        if (parkTimeout) {
            // 不合格:动作超时
            DEBUG("不合格:动作超时");
            err.push_back(10);
            AddExamFault(10, rtkTime);
            status = -1;
@@ -90,6 +91,7 @@
        // 是否压线
        if (CrashRedLine(map, car)) {
            // 不合格:车身出线
            DEBUG("不合格:车身出线");
            err.push_back(7);
            AddExamFault(7, rtkTime);
            status = -1;
@@ -110,6 +112,7 @@
        if (run_status > 0) {
            if (stopCar2S && currTarget != FIRST_TOUCH_CTRL_LINE) {
                // 扣5分:中途停车超过2秒
                DEBUG("扣5分:中途停车超过2秒");
                err.push_back(11);
                AddExamFault(11, rtkTime);
            }
@@ -127,6 +130,7 @@
                        DEBUG("来道场玩的");
                    } else {
                        // 不合格:未按规定线路行驶(直接跑出测试区了)
                        DEBUG("不合格:未按规定线路行驶(直接跑出测试区了)");
                        err.push_back(6);
                        AddExamFault(6, rtkTime);
                        status = -1;
@@ -166,6 +170,7 @@
                    status = 1;
                } else if (the_ctrl_line_crossed != 0) {
                    // 不合格:未按规定线路行驶(未回到起始点)
                    DEBUG("不合格:未按规定线路行驶(未回到起始点)");
                    err.push_back(6);
                    AddExamFault(6, rtkTime);
                    status = -1;
@@ -187,6 +192,7 @@
            if (first_ctrl_line_id > 0 && first_ctrl_line_id == the_ctrl_line_crossed) {
                // 不合格:未按规定线路行驶(试图做2次同方向的倒库)
                DEBUG("不合格:未按规定线路行驶(试图做2次同方向的倒库)");
                err.push_back(6);
                AddExamFault(6, rtkTime);
                status = -1;
@@ -208,6 +214,7 @@
                DEBUG("第二次倒库");
            } else if (currTarget != THIRD_TOUCH_CTRL_LINE) {
                // 不合格:倒车前,2前轮没驶过控制线
                DEBUG("不合格:倒车前,2前轮没驶过控制线");
                err.push_back(9);
                AddExamFault(9, rtkTime);
                status = -1;
@@ -227,6 +234,7 @@
        if (run_status < 0) {
            if (stopCar2S) {
                // 扣5分:中途停车
                DEBUG("扣5分:中途停车");
                err.push_back(11);
                AddExamFault(11, rtkTime);
            }
@@ -245,6 +253,7 @@
            if (carStopEvent) {
                if (!carParkSuccess) {
                    // 不合格:倒库不入
                    DEBUG("不合格:倒库不入");
                    err.push_back(8);
                    AddExamFault(8, rtkTime);
                    status = -1;
@@ -301,14 +310,12 @@
    p2.Y = (prev_car->carXY[car->left_front_tire[TIRE_OUTSIDE]].Y + prev_car->carXY[car->left_front_tire[TIRE_INSIDE]].Y) / 2;
    MakeLine(&track1, &p1, &p2);
    if (IntersectionOf(track1, leftCtrlLine) == GM_Intersection &&
            IntersectionOfLine(map->point[0], map->point[1], p1) == -1
        /*IntersectionOf(p1, map) == GM_None*/) {
            IntersectionOfLine(map->point[0], map->point[1], p1) == -1) {
        leftTireCrossLeftLine = true;
        DEBUG("左轮跨越左控制线");
    }
    if (IntersectionOf(track1, rightCtrlLine) == GM_Intersection &&
            IntersectionOfLine(map->point[6], map->point[7], p1) == -1
        /*IntersectionOf(p1, map) == GM_None*/) {
            IntersectionOfLine(map->point[6], map->point[7], p1) == -1) {
        leftTireCrossRightLine = true;
        DEBUG("左轮跨越右控制线");
    }
@@ -319,14 +326,12 @@
    p2.Y = (prev_car->carXY[car->right_front_tire[TIRE_OUTSIDE]].Y + prev_car->carXY[car->right_front_tire[TIRE_INSIDE]].Y) / 2;
    MakeLine(&track1, &p1, &p2);
    if (IntersectionOf(track1, leftCtrlLine) == GM_Intersection &&
            IntersectionOfLine(map->point[0], map->point[1], p1) == -1
        /*IntersectionOf(p1, map) == GM_None*/) {
            IntersectionOfLine(map->point[0], map->point[1], p1) == -1) {
        rightTireCrossLeftLine = true;
        DEBUG("右轮跨越左控制线");
    }
    if (IntersectionOf(track1, rightCtrlLine) == GM_Intersection &&
            IntersectionOfLine(map->point[6], map->point[7], p1) == -1
        /*IntersectionOf(p1, map) == GM_None*/) {
            IntersectionOfLine(map->point[6], map->point[7], p1) == -1) {
        rightTireCrossRightLine = true;
        DEBUG("右轮跨越右控制线");
    }