app/src/main/java/safeluck/drive/evaluation/DB/rtktb/RTKConfigWork.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/app.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/MapFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/platformMessage/decoder/PhoneCoder.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
im_lib/src/main/java/com/anyun/im_lib/netty/NettyTcpClient.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
im_lib/src/main/java/com/safeluck/aykj/utils/ArrayUtils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/test_items/driving_curve.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/java/safeluck/drive/evaluation/DB/rtktb/RTKConfigWork.java
@@ -1,6 +1,7 @@ package safeluck.drive.evaluation.DB.rtktb; import android.content.Context; import android.util.Log; import androidx.annotation.NonNull; import androidx.work.Worker; @@ -31,6 +32,7 @@ @NonNull @Override public Result doWork() { try { InputStream inputStream = getApplicationContext().getAssets().open(Constant.RTK_CONFIG_JSON); InputStreamReader inputStreamReader = new InputStreamReader(inputStream); app/src/main/java/safeluck/drive/evaluation/app.java
@@ -277,7 +277,6 @@ double longitude = jsSpeed.getDouble("longitude"); double altitude = jsSpeed.getDouble("altitude"); double speed = jsSpeed.getDouble("speed"); Log.i(TAG, "RTK info speed: "+speed); int qf = jsSpeed.getInt("qf"); double track_ture = jsSpeed.getDouble("track_ture"); String utc = jsSpeed.getString("utc"); @@ -298,9 +297,7 @@ AttachInfo attachInfo = new AttachInfo(); attachInfo.attach_message_id = Integer.parseInt(String.valueOf(0x40)); attachInfo.attach_message_length = 4; Log.i(TAG, "attachInfo.attach_message_id ="+attachInfo.attach_message_id ); if (attachInfo.attach_message_id == 0x41){ Log.i(TAG, "onClick: 41"); attachInfo.attach_data="00000000"; }else{ @@ -309,7 +306,6 @@ } jkMessage0206.attachInfo = attachInfo; Log.i(TAG, "位置上报="+jkMessage0206.toString()); MessageProcessor.getInstance().sendMessage(jkMessage0206); } catch (JSONException e) { app/src/main/java/safeluck/drive/evaluation/fragment/MapFragment.java
@@ -8,6 +8,7 @@ import android.graphics.Path; import android.os.Bundle; import android.os.Handler; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.SurfaceHolder; @@ -21,6 +22,7 @@ import androidx.appcompat.widget.Toolbar; import com.anyun.exam.lib.AYSdk; import com.anyun.exam.lib.MyLog; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -42,6 +44,7 @@ import safeluck.drive.evaluation.Constant; import safeluck.drive.evaluation.R; import safeluck.drive.evaluation.bean.ExamMap; import safeluck.drive.evaluation.bean.ExamPlatformData; import safeluck.drive.evaluation.bean.RealTimeCarPos; import safeluck.drive.evaluation.cEventCenter.CEventCenter; import safeluck.drive.evaluation.cEventCenter.ICEventListener; @@ -284,7 +287,7 @@ paint.setColor(Color.BLACK); Path path = new Path(); Log.i(TAG, "DrawMap: map.length:"+map.length); if (map.length != 9) { Log.d(TAG, "DrawMap X = " + String.format("%f", (float) (base_x + (map[0][0] - min_x) * scale_x)) + " Y = " + String.format("%f", (float) (base_y + (map[0][1] - min_y) * scale_y))); path.moveTo((float) (base_x + (map[0][0] - min_x) * scale_x), (float) (base_y + (map[0][1] - min_y) * scale_y)); @@ -312,8 +315,10 @@ canvas2.drawPath(path, paint); path.moveTo((float) (base_x + (car[body.get(0)][0] - min_x) * scale_x), (float) (base_y + (car[body.get(0)][1] - min_y) * scale_y)); for (int i = 1; i < body.size(); i++) for (int i = 1; i < body.size(); i++){ Log.d(TAG, "for 循环 DrawMap to X = " + (float) (base_x + (car[body.get(i)][0] - min_x) * scale_x)+ " Y = " + (float) (base_y + (car[body.get(i)][1] - min_y) * scale_y)); path.lineTo((float) (base_x + (car[body.get(i)][0] - min_x) * scale_x), (float) (base_y + (car[body.get(i)][1] - min_y) * scale_y)); } path.close(); @@ -481,12 +486,29 @@ // 3 - 侧方停车 // 4 - 曲线行驶 // 5 - 直角转弯 StringBuffer buffer=null; List<ExamMap> examMaps; String newmap = null; String mapPath = ExamPlatformData.getInstance().getMapPath(); if (!TextUtils.isEmpty(mapPath)){ MyLog.i("调用更新Map路径后的地图"+mapPath); byte[] fileContent = FileUtil.readFile(mapPath); if (fileContent != null){ newmap= new String(fileContent); Log.i(TAG, "文件内容:"+newmap); }else{ MyLog.i(String.format("文件:%s不存在",mapPath)); } }else{ buffer = FileUtil.readAssetTxtFile(_mActivity,Constant.MAP); } StringBuffer buffer = FileUtil.readAssetTxtFile(_mActivity,Constant.MAP); Type type = new TypeToken<List<ExamMap>>(){}.getType(); if (buffer != null){ List<ExamMap> examMaps = gson.fromJson(buffer.toString().trim(), type); examMaps= gson.fromJson(buffer.toString().trim(), type); }else{ examMaps = gson.fromJson(newmap.trim(),type); } @@ -519,7 +541,7 @@ break; } } } DrawMap(mainAnt, map, car, body, tire); } } app/src/main/java/safeluck/drive/evaluation/platformMessage/decoder/PhoneCoder.java
@@ -16,7 +16,6 @@ @Override public String encode(String str) { Log.i(TAG, "encode: "+str); if(str==null||"".equalsIgnoreCase(str)) { // str ="00000000000"; im_lib/src/main/java/com/anyun/im_lib/netty/NettyTcpClient.java
@@ -333,6 +333,7 @@ if (channel == null){ MyLog.i("PlatformMessage", "sendMsg fail,channel为空"+msg); return; } try { MyLog.i("PlatformMessage", "sendMsg: "+ BytesUtils.bytesToHexString(msg)); im_lib/src/main/java/com/safeluck/aykj/utils/ArrayUtils.java
@@ -9,7 +9,6 @@ public static byte[] subArray(byte[] srcBytes, int begin, int length) { byte[] bytes = new byte[length]; System.arraycopy(srcBytes,begin,bytes,0,length); Log.i("ArrayUtils", "subArray: "+byte2HexStr(bytes)); return bytes; } } lib/src/main/cpp/test_items/driving_curve.cpp
@@ -9,6 +9,7 @@ #include "../utils/xconvert.h" #include <vector> #include <cstdlib> using namespace std;