lizhanwei
2020-04-08 b15588663268654315f7bcbde71381684bf033ea
更新科三
2个文件已修改
220 ■■■■ 已修改文件
app/src/main/assets/roadmap.json 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/MainActivity.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/assets/roadmap.json
@@ -1,117 +1,87 @@
{
    "maps": [{
        "area": [45, 38, 39, 46],
        "id": 8890,
        "item": 106,
        "stop_flag": 0,
        "stop_line": [41, 42],
        "red_line": [
            [43, 44]
        ],
        "tts": "路口右转弯"
    }, {
        "area": [53, 48, 49, 54],
        "id": 8891,
        "item": 107,
        "stop_flag": 0,
        "stop_line": [51, 52],
        "tts": "通过人行横道"
    }, {
        "area": [],
        "id": 8892,
        "item": 102,
        "stop_flag": 0,
        "stop_line": [],
        "tts": "加减档"
    }, {
        "area": [63, 58, 59, 64],
        "id": 8893,
        "item": 110,
        "stop_flag": 0,
        "stop_line": [61, 62],
        "tts": "前方掉头"
    }, {
        "area": [71, 66, 67, 72],
        "id": 8894,
        "item": 101,
        "road_edge_line": [
            [73, 74]
        ],
        "stop_flag": 0,
        "stop_line": [69, 70],
        "tts": "直线行驶"
    }, {
        "area": [],
        "id": 8895,
        "item": 103,
        "road_edge_line": [
            [77, 78]
        ],
        "stop_flag": 0,
        "stop_line": [],
        "tts": "靠边停车"
    }, {
        "area": [87, 80, 81, 88],
        "id": 8896,
        "item": 105,
        "stop_flag": 0,
        "stop_line": [83, 84],
        "red_line": [
            [85, 86]
        ],
        "tts": "路口左转弯"
    }, {
        "area": [95, 90, 91, 96],
        "id": 8897,
        "item": 108,
        "stop_flag": 0,
        "stop_line": [93, 94],
        "tts": "通过学校区域"
    }, {
        "area": [103, 98, 99, 104],
        "id": 8898,
        "item": 109,
        "stop_flag": 0,
        "stop_line": [101, 102],
        "tts": "通过公共汽车站"
    }, {
        "area": [111, 106, 107, 112],
        "id": 8900,
        "item": 104,
        "stop_flag": 0,
        "stop_line": [109, 110],
        "tts": "通过路口"
    }, {
        "all_trigger_line": [
            [8890, 45, 46],
            [8891, 53, 54],
            [8892, 55, 56],
            [8893, 63, 64],
            [8894, 71, 72],
            [8895, 75, 76],
            [8896, 87, 88],
            [8897, 95, 96],
            [8898, 103, 104],
            [8900, 111, 112]
        ],
        "green_line": [
            [27, 28],
            [33, 34]
        ],
        "id": 8899,
        "item": 100,
        "red_area": [
            [47, 48, 49, 50]
        ],
        "red_line": [
            [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
            [14, 15],
            [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],
            [29, 30],
            [31, 32],
            [35, 36]
        ],
        "stop_flag": 0
    }],
    "points": [-8647.003, 14590.7213, -8643.5524, 14578.1376, -8643.4688, 14577.3293, -8643.4743, 14576.6703, -8643.6189, 14575.6231, -8643.8986, 14574.7303, -8644.429, 14573.7859, -8645.0267, 14573.0804, -8645.7975, 14572.5144, -8646.6964, 14572.0564, -8647.9003, 14571.5898, -8649.254, 14571.2718, -8651.2344, 14570.9548, -8676.9505, 14567.7086, -8677.008, 14564.2895, -8647.9699, 14568.5768, -8677.1016, 14560.8499, -8648.6754, 14565.6031, -8647.0386, 14565.793, -8645.5361, 14565.9325, -8643.9894, 14565.9878, -8642.4894, 14565.828, -8641.1371, 14565.3513, -8640.1083, 14564.4899, -8639.3371, 14563.1737, -8638.7768, 14561.5024, -8615.0639, 14476.9774, -8611.3183, 14477.2584, -8643.7051, 14592.6597, -8640.3308, 14593.415, -8608.1896, 14478.7504, -8607.5516, 14478.8765, -8639.2427, 14591.991, -8636.3273, 14594.4586, -8603.9223, 14479.1086, -8600.1545, 14479.3763, -8632.4911, 14594.4536, -8643.6786, 14578.4015, -8641.0622, 14569.2537, -8634.1519, 14571.662, -8636.5751, 14580.2974, -8643.6786, 14578.4015, -8636.5751, 14580.2974, -8641.0622, 14569.2537, -8634.1519, 14571.662, -8646.4285, 14588.016, -8639.2769, 14589.9255, -8634.4653, 14545.6261, -8632.5501, 14538.899, -8625.5379, 14540.9341, -8627.4065, 14547.6014, -8634.4653, 14545.6261, -8627.4065, 14547.6014, -8637.2035, 14555.2439, -8630.1052, 14557.2304, -8626.3309, 14516.8481, -8618.8811, 14518.887, -8615.147, 14476.9265, -8612.3882, 14467.0731, -8597.9713, 14471.9742, -8600.4647, 14480.9003, -8615.147, 14476.9265, -8600.4647, 14480.9003, -8617.8432, 14486.5562, -8603.1551, 14490.5316, -8607.0038, 14504.1069, -8616.1047, 14536.1608, -8623.4875, 14535.0492, -8614.6801, 14502.1867, -8607.0038, 14504.1069, -8614.6801, 14502.1867, -8604.2725, 14494.4871, -8612.0914, 14492.5276, -8607.3643, 14503.5206, -8616.3071, 14536.8527, -8620.0983, 14550.3554, -8627.0878, 14547.8972, -8619.878, 14549.5298, -8626.2008, 14572.0174, -8630.8126, 14588.3057, -8634.1112, 14600.1533, -8640.9894, 14596.3771, -8635.6092, 14577.056, -8630.8126, 14588.3057, -8635.6092, 14577.056, -8634.1112, 14600.1533, -8640.9894, 14596.3771, -8628.1304, 14578.6721, -8632.9266, 14567.4225, -8667.0986, 14568.9677, -8676.8874, 14567.7089, -8676.2956, 14564.3175, -8666.6833, 14565.7012, -8667.0986, 14568.9677, -8666.6833, 14565.7012, -8657.1803, 14570.2432, -8656.7853, 14567.126, -8670.2809, 14561.9004, -8665.0482, 14562.7364, -8665.7617, 14565.9309, -8670.5605, 14565.2382, -8670.5605, 14565.2382, -8666.6833, 14565.7012, -8680.1557, 14560.3228, -8680.4579, 14563.8095, -8640.9128, 14566.6535, -8636.7411, 14567.4991, -8637.4664, 14570.3833, -8642.6811, 14569.5229, -8640.9128, 14566.6535, -8642.6811, 14569.5229, -8650.7135, 14564.6669, -8652.5477, 14567.895]
  "points": [0, 1, 1.6, 1, 2.55, 1, 3.05, 1, 4.55, 1, 5.003, 1, 6.003, 1, 9.003, 1, 9.003, 4, 0, 0.5, 9.003, 0.5, 0, 0, 1.6, 0, 2.55, 0, 3.05, 0, 4.55, 0, 5.003, 0, 5.003, -2, 5.003, -3, 5.003, -4, 6.003, -4, 7.003, -4, 9.003, -4, 10.003, -4, 10.003, -3, 10.003, 4, 6.003, 0, 9.003, 0, 6.003, 0, 6.003, -3, 9.003, -3, 9.003, 0, 5.503, 0, 5.503, -2, 5.503, -3.5, 7.003, -3.5, 9.503, -3.5, 9.503, 4, 1.6, 1, 1.6, 0, 2.55, 1, 2.55, 0, 3.05, 0, 3.05, 1, 4.55, 1, 4.55, 0, 5.003, 1, 5.003, 0, 6.003, 0, 6.003, 1, 6.003, -2, 5.003, -2, 6.003, -3, 5.003, -3, 5.003, -4, 6.003, -4, 9.003, -1, 10.003, -1, 9.003, 0, 10.003, 0, 10.003, 1, 9.003, 1,11.003,4,11.003,-4,10.5003,4,10.5003,-4,
    10.003,3,9.003,3,10.003,4,9.003,4,11.003,4,10.003,4,11.003,3,10.003,3,11.003,1,10.003,1,11.003,0,10.003,0,11.003,-1,10.003,-1,11.003,-2,10.003,-2,10.5003,-3,10.5003,-3,11.003,-3,10.003,-3],
  "name": "科三路考地图",
  "type": "road",
  "maps": [{
    "id": 1000,
    "item": 100,
    "red_line": [
      [0, 1, 2, 3, 4, 5, 6, 7, 8],
      [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
      [26, 27],
      [28, 29, 30, 31],
      [62,63]
    ],
    "green_line": [
      [9, 10],
      [32, 33, 34, 35, 36, 37],
      [64, 65]
    ],
    "all_trigger_line": [
      [1002, 39, 38],
      [1003, 45, 44],
      [1004, 57, 56],
      [1005, 51, 50],
      [1006, 66, 67],
      [1007, 73,74],
      [1008, 77,78]
    ],
    "red_area": [
      [40, 41, 42, 43]
    ]
  }, {
    "id": 1003,
    "item": 106,
    "tts": "前方右转",
    "stop_line": [47, 46],
    "area": [44,45,48, 49],
    "red_line": [
      [26, 6]
    ],
    "stop_flag": 0
  }, {
    "id": 1002,
    "item": 107,
    "tts": "前方通过人行横道",
    "stop_line": [41, 40],
    "area": [38,39,42,43],
    "stop_flag": 0
  }, {
    "id": 1004,
    "item": 104,
    "tts": "直行通过路口",
    "stop_line": [59, 58],
    "area": [56,57,60,61],
    "stop_flag": 0
  }, {
    "id": 1005,
    "item": 105,
    "tts": "前方左转弯",
    "stop_line": [53, 52],
    "area": [50,51,54,55],
    "stop_flag": 0
  }, {
    "id": 1006,
    "item": 110,
    "tts": "前方掉头",
    "stop_line": [68, 69],
    "area": [67,69,70,72],
    "stop_flag": 0
  }, {
    "id": 1007,
    "item": 102,
    "tts": "加减档位",
    "stop_line": [75, 76],
    "area": [73,74,76,75],
    "stop_flag": 0
  }, {
    "id": 1008,
    "item": 101,
    "tts": "直线行驶",
    "road_edge_line": [[81, 82]],
    "stop_line": [79, 80],
    "area": [77,78,84,83],
    "stop_flag": 0
  }]
}
app/src/main/java/safeluck/drive/evaluation/MainActivity.java
@@ -6,10 +6,12 @@
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
@@ -102,6 +104,7 @@
        super.onCreate(savedInstanceState);
        //全屏
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        hideBottomUIMenu();
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_main);
        //初始化tts
@@ -326,6 +329,21 @@
        ExamPlatformData.getInstance().setExamplatformStatus(ExamPlatformData.TCP_DISCONNECT);
        MyLog.i(TAG,"TCP连接失败");
    }
    /**
     * 隐藏虚拟按键,并且全屏
     */
    protected void hideBottomUIMenu() {
        //隐藏虚拟按键,并且全屏
        if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api
            View v = this.getWindow().getDecorView();
            v.setSystemUiVisibility(View.GONE);
        } else if (Build.VERSION.SDK_INT >= 19) {
            //for new api versions.
            View decorView = getWindow().getDecorView();
            int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN;
            decorView.setSystemUiVisibility(uiOptions);
        }
    }
}