yy1717
2020-04-02 24428a1b69afcf113883e9cede1159443201a1b8
lib/src/main/cpp/test_items/turn_a90.cpp
@@ -10,6 +10,7 @@
#include "../utils/xconvert.h"
#include "../defs.h"
#include "../test_common/car_sensor.h"
#include "../master/comm_if.h"
#include <vector>
#include <cstdlib>
@@ -21,6 +22,7 @@
const uint32_t STOP_CAR_TIME = D_SEC(2);
static bool testing;
static int mapIndex;
static int enterAreaHeading;
static bool turnLeftFinished;
@@ -33,7 +35,7 @@
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;
@@ -45,6 +47,9 @@
    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)
@@ -118,6 +123,11 @@
    if (turnLeftFinished) {
    }
    if (!testing) {
        MA_EnterMap(mapIndex, MAP_TYPE_TURN_90, 0);
    }
TEST_END:
    return testing? 1:0;
}