lizhanwei
2020-01-20 39573da26137913422e6a4b8646eddfa8ef52c50
lib/src/main/cpp/driver_test.cpp
@@ -153,7 +153,7 @@
        MapList[MapNum].map.point = (PointF *)malloc(sizeof(PointF) * pointNum);
        for (int i = 0; i < pointNum; ++i) {
            MapList[MapNum].map.point[i].X = map[i][0];
            MapList[MapNum].map.point[i].Y = map[i][0];
            MapList[MapNum].map.point[i].Y = map[i][1];
        }
    }
@@ -162,7 +162,7 @@
        MapList[MapNum].map2.point = (PointF *)malloc(sizeof(PointF) * pointNum2);
        for (int i = 0; i < pointNum2; ++i) {
            MapList[MapNum].map2.point[i].X = map2[i][0];
            MapList[MapNum].map2.point[i].Y = map2[i][0];
            MapList[MapNum].map2.point[i].Y = map2[i][1];
        }
    }
@@ -293,6 +293,8 @@
{
    bool err = false;
    DEBUG("StartDriverExam %d", start);
    if (MapNum == 0) {
        err = true;
        MA_SendExamStatus(0, -1);
@@ -376,9 +378,13 @@
                CurrExamMapId = EnterMap(CarModel, MapList, MapNum);
                int mtype = GetMapType(CurrExamMapId, MapList, MapNum);
                DEBUG("CurrExamMapId %d mtype %d", CurrExamMapId, mtype);
                switch (mtype) {
                    case MAP_TYPE_PARK_BUTTOM:
                        DEBUG("进入倒车入库场地");
                        MA_SendDebugInfo("进入倒车入库场地 %d", CurrExamMapId);
                        StartParkBottom();
                        CurrExamStatus = 0;
                        break;
@@ -405,14 +411,6 @@
        rtkTime.ss = RtkBuffer[index].ss;
        rtkTime.mss = RtkBuffer[index].dss;
        static int en = 0;
        static int gcc = 0;
        if (gcc % 100 == 0) {
            AddExamFault(++en, &rtkTime);
        }
        gcc++;
        if (CurrExamMapId >= 0) {
            if (CurrExamStatus == 0) {
                int mtype = GetMapType(CurrExamMapId, MapList, MapNum);
@@ -436,6 +434,7 @@
            if (CurrExamStatus != 0) {
                if (ExitMap(CarModel, CurrExamMapId, MapList, MapNum)) {
                    DEBUG("退出场地 %d", CurrExamMapId);
                    MA_SendDebugInfo("退出场地 %d", CurrExamMapId);
                    CurrExamMapId = -1;
                }
            }