| | |
| | | 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]; |
| | | } |
| | | } |
| | | |
| | |
| | | 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]; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | bool err = false; |
| | | |
| | | DEBUG("StartDriverExam %d", start); |
| | | |
| | | if (MapNum == 0) { |
| | | err = true; |
| | | MA_SendExamStatus(0, -1); |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | if (CurrExamStatus != 0) { |
| | | if (ExitMap(CarModel, CurrExamMapId, MapList, MapNum)) { |
| | | DEBUG("退出场地 %d", CurrExamMapId); |
| | | MA_SendDebugInfo("退出场地 %d", CurrExamMapId); |
| | | CurrExamMapId = -1; |
| | | } |
| | | } |