From b73d096243f1859d69a6c5d5bf014837519c0768 Mon Sep 17 00:00:00 2001 From: Surenjun Date: Tue, 15 Oct 2024 18:11:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B1=8F=E8=94=BD=E5=80=92=E5=85=A5?= =?UTF-8?q?=E9=87=8C=E7=A8=8B=E8=AE=A1=E7=AE=97=E7=9A=84c++=E5=8C=85?= =?UTF-8?q?=EF=BC=8C=E4=B8=B4=E6=97=B6=E5=A4=84=E7=90=86=E8=BD=A8=E8=BF=B9?= =?UTF-8?q?=E9=BB=91=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-profile.json5 | 4 ++-- entry/src/main/ets/common/utils/UdpJudge.ts | 18 ++++++++++-------- .../ets/pages/compontents/judge/RealTime.ets | 2 +- entry/src/main/ets/pages/judgeSDK/judge.ts | 2 +- .../ets/pages/judgeSDK/utils/judgeConfig.ts | 6 +++--- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/build-profile.json5 b/build-profile.json5 index 5d0750fa..99cb3b7d 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -5,9 +5,9 @@ "name": "default", "material": { "certpath": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer", - "storePassword": "0000001BE4BBADDF656A884E7A7BB5FD51F64FBB61DD24A944FEA969482DD693210ED5FF3D29F13642E3A3", + "storePassword": "0000001BAD00152A1312FDFF36506E6213A7CA54645862036F27B3CEE18B0F94261FD956C0AFB6FCC8DC9C", "keyAlias": "debugKey", - "keyPassword": "0000001BDEFFDC280B45617E7FC447CB21F2D133540301F543454643D3F5E9F6E5ED2A583A7FA92B260433", + "keyPassword": "0000001B57A42F3DE66C0CBBDBF2C70CE68748BD6148A5658BDCF87F2C3D9666E07A43A748780268553C40", "profile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b", "signAlg": "SHA256withECDSA", "storeFile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12" diff --git a/entry/src/main/ets/common/utils/UdpJudge.ts b/entry/src/main/ets/common/utils/UdpJudge.ts index 0c366bf4..243b0f67 100644 --- a/entry/src/main/ets/common/utils/UdpJudge.ts +++ b/entry/src/main/ets/common/utils/UdpJudge.ts @@ -4,7 +4,9 @@ import { testKm2Items,testKm3Items } from '../../pages/judgeSDK/dataTest/index' import { judgeConfig } from '../../pages/judgeSDK/utils/judgeConfig'; import { setJudgeUdp, setTopLineUdp } from './GlobalUdp'; import { convertGpsCoord2 } from '../utils/tools'; -import {examCalcGpsDistance} from '../../pages/judgeSDK/api' + +//@ts-ignore +import libJudgeSdk from '@ohos.judgesdk' import GetDistance from '../utils/GetDistance' export const initJudgeUdp = async () => { globalThis.serialIndex = 0; @@ -36,13 +38,13 @@ export const initJudgeUdp = async () => { const wd = convertGpsCoord2(msgArr[95]*1 || 0); udp.send(bytes) if(prevJd && msgArr[83] == 4){ - const distance = await examCalcGpsDistance({ - jd1:prevJd, - wd1:preWd, - jd2:jd, - wd2:wd, - h:msgArr[90]*1 || 1, - }) + // const distance = await libJudgeSdk.examCalcGpsDistance({ + // jd1:prevJd, + // wd1:preWd, + // jd2:jd, + // wd2:wd, + // h:msgArr[90]*1 || 1, + // }) //@ts-ignore globalThis.distanceClass?.setTimeData(((distance / 100).toFixed(2)) * 1) } diff --git a/entry/src/main/ets/pages/compontents/judge/RealTime.ets b/entry/src/main/ets/pages/compontents/judge/RealTime.ets index 6bfd4a8a..c1c4fefa 100644 --- a/entry/src/main/ets/pages/compontents/judge/RealTime.ets +++ b/entry/src/main/ets/pages/compontents/judge/RealTime.ets @@ -4,7 +4,7 @@ import Judge from '../../judgeSDK/utils/judgeReal'; import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d'; import common from '@ohos.app.ability.common'; import { - examJudgeMapSetScaling + examJudgeMapSetScaling, } from '../../judgeSDK/api' interface RoadDataType { diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 7edfee52..dfdd1325 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -168,7 +168,7 @@ export default class Judge { avPlayer.playAudio([globalThis.singlePlay ? 'voice/ksks.WAV' : 'voice/监管成功.mp3']) if(!globalThis.singlePlay){ - this.videoData = await saveStartRecordVideo(`${name}_${kssycs}`) + // this.videoData = await saveStartRecordVideo(`${name}_${kssycs}`) } const {examSubject,projectsObj} = this.judgeUI diff --git a/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts b/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts index f1fdb803..c9a0bab4 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts @@ -2,9 +2,9 @@ //考试回放开关 export const judgeConfig = { //本地目录开关 - isTrajectoryOpen: false, + isTrajectoryOpen: true, //是否开启拍照 - isPhotoOpen: true, + isPhotoOpen: false, //扣分语音是否强制开启 kfVoiceOpen: false, //忽略的考试项目 @@ -16,7 +16,7 @@ export const judgeConfig = { // 本地模型地址 modelPath: 'models/model_enc', // 济南科目三 - trajectoryPath: 'logs/2024_08_29/2024_08_29_09_48_08_2230612098578_410311200501058031_闫嘉衡/judge_exam_data.txt', + trajectoryPath: 'logs/2024_08_07_13_33_17_9999945345838_614384489851629952_管婕/judge_exam_data.txt', //四合一画面配置 fourInOneScreen:{ //gps位数