lib/src/main/cpp/master/comm_if.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/master/comm_if.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/rtk_platform/platform.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/java/com/anyun/exam/lib/RemoteService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/java/com/anyun/exam/lib/Upgrade.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
lib/src/main/cpp/master/comm_if.cpp
@@ -443,7 +443,8 @@ writer.Double(brief->speed); writer.Key("track_ture"); writer.Double(brief->trackTure); writer.Key("rtcm_length"); writer.Int(brief->rtcm_length); writer.EndObject(); SendMsgToMainProcIndep(ID_SM_RTK_BRIEF, sb.GetString()); lib/src/main/cpp/master/comm_if.h
@@ -88,6 +88,7 @@ double altitude; double speed; double trackTure; int rtcm_length; }; struct carBrief { lib/src/main/cpp/rtk_platform/platform.cpp
@@ -84,6 +84,8 @@ static sem_t sem_status_changed; static bool requestPlatformSendRtk = false; static bool rtcmLength = 0; static CTcpPort *ctp = NULL; static pthread_mutex_t events_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -413,6 +415,7 @@ rbf.altitude = gbf.altitude; rbf.speed = gbf.speed; rbf.trackTure = gbf.trackTure; MA_SendRtkBrief(&rbf); } // MA_SendGpsBrief(&brief); @@ -433,6 +436,8 @@ rbf.roll = rtk->roll; rbf.coord_x_dir = 'N'; rbf.coord_y_dir = 'E'; rbf.rtcm_length = rtcmLength; sprintf(rbf.utc, "%04d%02d%02d%02d%02d%02d.%02d", 2000 + rtk->YY, rtk->MM, rtk->DD, rtk->hh, rtk->mm, rtk->ss, rtk->dss); if (!strcmp(rbf.utc, gbf.utc)) { @@ -442,6 +447,7 @@ rbf.altitude = gbf.altitude; rbf.speed = gbf.speed; rbf.trackTure = gbf.trackTure; MA_SendRtkBrief(&rbf); } @@ -516,7 +522,6 @@ break; } case CAR_SENSOR_UPDATE_EVT: { DEBUG("CAR_SENSOR_UPDATE_EVT"); struct carSensorBrief brief; int x = 20; @@ -585,8 +590,6 @@ if (sensor.clutch == 1) sensor.gear = 0; DEBUG("电池电压 %f", sensor.cellVolt); UpdateSensor(&sensor); break; @@ -799,18 +802,20 @@ void ReceivedRtk(const uint8_t *data, int length) { DEBUG("ReceivedRtk length %d", length); AppTimer_delete(RequestRtkNoResp); rtcmLength = length; // 汇报给单片机 if (length > 0) { SendRtkToMcu(data, length); } AppTimer_add(RequestRtkNoResp, D_SEC(7)); // 应该每秒收到一次 } static void RequestRtkNoResp(union sigval sig) { AppTimer_delete(RequestRtkNoResp); requestPlatformSendRtk = true; rtcmLength = 0; } void RequestRtkDownload(const gpsStatus_t *gps, uint16_t rtk_pkt_interval) lib/src/main/java/com/anyun/exam/lib/RemoteService.java
@@ -431,6 +431,7 @@ public void ConnectBluetooth(String name, String pin) { if (mBluetooth != null && mChatService != null) { Log.d(TAG, "执行蓝牙连接请求 " + name); mBluetooth.SetPin(pin); mTargetBluetooth = name; if (isMac(name)) { @@ -441,6 +442,8 @@ mDiscoveryBluetooth = true; mBluetooth.doDiscovery(name); } } else { Log.d(TAG, "拒绝蓝牙连接请求 " + name); } } lib/src/main/java/com/anyun/exam/lib/Upgrade.java
@@ -33,6 +33,9 @@ private Context context; private DownloadManagerUtil downloadManagerUtil = null; private InstallUtil installUtil = null; private static final String SAVE_FILE_NAME = "aks3.apk"; private static final String SAVE_TITLE = "aks3"; private static final String SAVE_DESC = "驾考App升级"; public static Upgrade getInstance(Context context) { if (instance == null) { @@ -222,7 +225,7 @@ if (installUtil.getVerCode() < dfuFileInfo.getAppVerCode()) { Log.d(TAG, "下载地址 " + dfuFileInfo.getAppUrl()); downloadManagerUtil.DownloadFile(dfuFileInfo.getAppUrl(), "aks3.apk", "aks3", "驾考app升级"); downloadManagerUtil.DownloadFile(dfuFileInfo.getAppUrl(), SAVE_FILE_NAME, SAVE_TITLE, SAVE_DESC); // downloadManagerUtil.DownloadFile("https://ftp-idc.pconline.com.cn/pub/download/201010/AutoCAD2007.rar?md5=KeZ0iEmKKGEWJ5c7OVxk_w&expires=1592964150", "aks3.apk", "aks3", "驾考app升级"); } } @@ -258,7 +261,7 @@ @Override public void DownloadComplete(String title, String path) { if (title != null && path != null) { if (title.equals("aks3")) { if (title.equals(SAVE_TITLE)) { Signature[] sig = installUtil.getSignature(); Signature[] sig2 = installUtil.getSignature(path);