yy1717
2020-09-29 2cfc22e1ea5140861499ee5b7142766fb8f754f7
lib/src/main/cpp/test_items/park_bottom.cpp
@@ -33,6 +33,8 @@
static int mapIndex = 0;
const uint32_t STOP_CAR_TIME = D_SEC(2);
const uint32_t CHECK_PARK_DELAY = 400;
static uint32_t stopTimepoint;
static int prevMoveDirect, storeMoveDirectBeforeStop;
static bool occurCrashRedLine;
@@ -165,7 +167,7 @@
            stopTimepoint = tp;
            storeMoveDirectBeforeStop = prevMoveDirect;
            if (prevMoveDirect == -1) {
                checkPartStatus = true;
                checkPartStatus = true;         // 每次倒车停止,触发入库检查
            }
            DEBUG("停车了 %d %d %d %d %d %d %d", rtkTime->YY, rtkTime->MM, rtkTime->DD, rtkTime->hh, rtkTime->mm, rtkTime->ss, rtkTime->mss);
@@ -198,14 +200,10 @@
                }
            } else {
                // 切换为前进
                if (tp - stopTimepoint >= STOP_CAR_TIME) {
                DEBUG("切换为前进");
                if (tp - stopTimepoint >= CHECK_PARK_DELAY) {
                    if (crossCtrlLineSw) {
                        if (checkPartStatus) {
                            if (EnterParking(map, car)) {
                                parkStatus[parkCount] = 1;
                            }
                            checkPartStatus = false;
                        }
                        if (parkStatus[parkCount] != 1) {
                            // 倒库不入,不合格
                            reportParkFail = true;
@@ -234,7 +232,7 @@
            firstReverseTimepoint = tp;
        }
    } else if (moveDirect == 0 && crossCtrlLineSw) {
        if (tp - stopTimepoint >= STOP_CAR_TIME && checkPartStatus) {
        if (tp - stopTimepoint >= CHECK_PARK_DELAY && checkPartStatus) {
            if (EnterParking(map, car)) {
                parkStatus[parkCount] = 1;
            }