| | |
| | | |
| | | static int breakActive; |
| | | static int stopActive; |
| | | static bool crashRedLine; |
| | | |
| | | void StartThroughExam(int index, LIST_ROAD_MAP &RoadMapList) |
| | | { |
| | | if (index == -1) |
| | | return; |
| | | DEBUG("进入路考子地图 index = %d id = %d item = %d", index, RoadMapList[index].id, RoadMapList[index].type); |
| | | DEBUG("进入路考通过something地图 index = %d id = %d item = %d", index, RoadMapList[index].id, RoadMapList[index].type); |
| | | if (!RoadMapList[index].tts.empty()) { |
| | | DEBUG("播放TTS"); |
| | | PlayTTS(RoadMapList[index].tts.c_str(), 0); |
| | | } else { |
| | | DEBUG("没有TTS"); |
| | | } |
| | | breakActive = 0; |
| | | stopActive = 0; |
| | | crashRedLine = false; |
| | | } |
| | | |
| | | int ExecuteThroughExam(int index, LIST_ROAD_MAP &RoadMapList, const car_model *car, |
| | |
| | | default: |
| | | break; |
| | | } |
| | | stopActive = -1; |
| | | } else if (distance2StopLine < DISTANCE_STOP_CAR_TO_STOP_LINE) { |
| | | if (moveDirect == 0) { |
| | | stopActive = 1; |
| | |
| | | } |
| | | } |
| | | |
| | | if (ExitSonArea(index, RoadMapList, car)) |
| | | if (CrashSonRedLine(index, RoadMapList, car, CarModelList)) { |
| | | if (!crashRedLine) { |
| | | DEBUG("不按考试员指令行驶"); |
| | | crashRedLine = true; |
| | | // 不按考试员指令行驶 |
| | | AddExamFault(3, rtkTime); |
| | | } |
| | | } else { |
| | | crashRedLine = false; |
| | | } |
| | | |
| | | if (ExitSonArea(index, RoadMapList, car)) { |
| | | DEBUG("离开通过something区域"); |
| | | return -1; |
| | | } |
| | | |
| | | return index; |
| | | } |
| | | |