| | |
| | | #include "../utils/xconvert.h" |
| | | #include "../defs.h" |
| | | #include "../test_common/car_sensor.h" |
| | | #include "../master/comm_if.h" |
| | | |
| | | #include <vector> |
| | | #include <cstdlib> |
| | |
| | | const uint32_t STOP_CAR_TIME = D_SEC(2); |
| | | |
| | | static bool testing; |
| | | static int mapIndex; |
| | | |
| | | static int enterAreaHeading; |
| | | static bool turnLeftFinished; |
| | |
| | | static bool CrashRedLine(const Polygon *map, const car_model *car); |
| | | static bool ExitTestArea(const Polygon *map, const car_model *car); |
| | | |
| | | void StartTurnA90(int moveDirect, double heading, const struct RtkTime *rtkTime) |
| | | void StartTurnA90(int index, int moveDirect, double heading, const struct RtkTime *rtkTime) |
| | | { |
| | | DEBUG("进入直角转弯场地"); |
| | | testing = true; |
| | |
| | | reportStopCarTimeout = false; |
| | | crashRedLine = false; |
| | | turnLeftFinished = false; |
| | | mapIndex = index; |
| | | |
| | | MA_EnterMap(mapIndex, MAP_TYPE_TURN_90, 1); |
| | | } |
| | | |
| | | int TestTurnA90(const Polygon *map, const car_model *car, const car_model *carPrev, double heading, double speed, int moveDirect, const struct RtkTime *rtkTime) |
| | |
| | | if (turnLeftFinished) { |
| | | |
| | | } |
| | | |
| | | if (!testing) { |
| | | MA_EnterMap(mapIndex, MAP_TYPE_TURN_90, 0); |
| | | } |
| | | |
| | | TEST_END: |
| | | return testing? 1:0; |
| | | } |