wangzhengquan
2020-09-17 f6d7dbd2ac6938526b1023d1bc571d562b4625cf
test/test_right_walk3.c
@@ -45,11 +45,13 @@
int test2() {
    // IndirectAlg indirectAlg({  {{0.0, 0.0}, {1000.0, 0.0}}, {{1000.0, 0.0}, {1000.0, 1000.0}}, {{1000.0, 1000.0}, {0.0, 1000.0}}, {{0.0, 1000.0}, {0.0, 0.0}} }, 5, {1, 1});
    /**
     * 第一个参数@points  组成观测区域的彼此相邻的点
     * 第二个参数@_keepTime 保持时间
     * 第三个参数@_direction 正确行进的方向方向
     * @points  组成观测区域的彼此相邻的点
     * @_direction 正确行进的方向方向
     * @_keepTime 保持时间
     * @ minDistance 最小移动距离
     */
    IndirectAlg indirectAlg((std::initializer_list<Point>){{0.0, 0.0}, {1000.0, 0.0},  {1000.0, 1000.0}, {0.0, 1000.0} }, 5, {1, 1});
    IndirectAlg indirectAlg((std::initializer_list<Point>){{0.0, 0.0}, {1000.0, 0.0},  {1000.0, 1000.0}, {0.0, 1000.0} },
        {1, 1}, 5, 1);
    
    int i = 0;
    // time_t start_time;
@@ -94,7 +96,7 @@
void test3() {
    std::ifstream fin("test3.txt");
    std::ifstream fin("test.txt");
    char line[1024];
    //std::string line;
    char *targetIdStr;
@@ -107,7 +109,7 @@
//{"x":148,"y":45},{"x":148,"y":539},{"x":769,"y":539},{"x":769,"y":45}
    //{148, 45}, {148, 539},  {769, 539}, {769, 45}
    Record record;
    IndirectAlg indirectAlg((std::initializer_list<Point>){}, 3, {621, 0});
    IndirectAlg indirectAlg((std::initializer_list<Point>){}, {621, 0}, 3, 0);
    
    // const char *delim = " ";
    while(fin.getline(line, 1024)) {
@@ -152,7 +154,6 @@
        // printf("key = %s, value=%s\n", key, value);
    }
    fin.close();
    sleep(30);
}