fix: 解决轨迹黑屏问题
This commit is contained in:
parent
2a2fd3767d
commit
93cec28b1f
@ -7,10 +7,9 @@ import {
|
|||||||
WorkerBackMessage,
|
WorkerBackMessage,
|
||||||
WorkerBackMessageType
|
WorkerBackMessageType
|
||||||
} from '../../model';
|
} from '../../model';
|
||||||
import apiJudgeSdk from '@ohos.judgesdk';
|
|
||||||
|
|
||||||
import { DifferentialAndSignal } from '../../utils/business/DifferentialAndSignalWorker';
|
import { DifferentialAndSignal } from '../../utils/business/DifferentialAndSignalWorker';
|
||||||
import { examJudgeMapSetScaling } from '../Judge/JudgeUtils';
|
import { examJudgeMapSetDrawing, examJudgeMapSetScaling } from '../Judge/JudgeUtils';
|
||||||
import { dConsole } from '../../utils/LogWorker';
|
import { dConsole } from '../../utils/LogWorker';
|
||||||
import { SignDisplayTag } from '../../config';
|
import { SignDisplayTag } from '../../config';
|
||||||
|
|
||||||
@ -198,17 +197,18 @@ struct trajectoryComponent {
|
|||||||
XComponent({
|
XComponent({
|
||||||
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变
|
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变
|
||||||
type: 'surface',
|
type: 'surface',
|
||||||
libraryname: 'JudgeSdk'
|
// libraryname: 'JudgeSdk'
|
||||||
// libraryname: 'judgesdk'
|
libraryname: 'judgesdk'
|
||||||
})
|
})
|
||||||
.width("100%")
|
.width("100%")
|
||||||
.height("100%")
|
.height("100%")
|
||||||
.onLoad(() => {
|
.onLoad(() => {
|
||||||
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制
|
dConsole.log("开始绘制")
|
||||||
|
examJudgeMapSetDrawing(true)
|
||||||
})
|
})
|
||||||
.onDestroy(() => {
|
.onDestroy(() => {
|
||||||
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制
|
dConsole.log("结束绘制")
|
||||||
// clearInterval(globalThis.realTimer)
|
examJudgeMapSetDrawing(false)
|
||||||
})
|
})
|
||||||
Row() {
|
Row() {
|
||||||
Image($rawfile('judge/big.png')).width(60).onClick(() => {
|
Image($rawfile('judge/big.png')).width(60).onClick(() => {
|
||||||
|
|||||||
@ -1876,7 +1876,7 @@ export default class Judge {
|
|||||||
}
|
}
|
||||||
//日志回调
|
//日志回调
|
||||||
dConsole.info(JudgeTag, '1.进入评判入口')
|
dConsole.info(JudgeTag, '1.进入评判入口')
|
||||||
await examJudgeSetLogCallback(3, async (level: number, info: string, len: number) => {
|
await examJudgeSetLogCallback(6, async (level: number, info: string, len: number) => {
|
||||||
dConsole.log(JudgeTag, '评判日志:' + info)
|
dConsole.log(JudgeTag, '评判日志:' + info)
|
||||||
// await fileLog?.setExamJudgeLogData(info);
|
// await fileLog?.setExamJudgeLogData(info);
|
||||||
dConsole.writeProcessData(ProcessDataEnumType.JudgeLogData, info)
|
dConsole.writeProcessData(ProcessDataEnumType.JudgeLogData, info)
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import { CenterUDPBusinessInstance } from './CenterUdpBusiness';
|
|||||||
import { ObtainUdpBusinessInstance } from './ObtainUdpBusiness';
|
import { ObtainUdpBusinessInstance } from './ObtainUdpBusiness';
|
||||||
import systemTime from '@ohos.systemDateTime';
|
import systemTime from '@ohos.systemDateTime';
|
||||||
import { SerialNumberInstance } from '../SerialNumber';
|
import { SerialNumberInstance } from '../SerialNumber';
|
||||||
import { examCalcGpsDistance } from '../../pages/Judge/JudgeUtils';
|
|
||||||
import { GetDwStatusType, GetTranslateSignals } from '../../pages/Judge/utils';
|
import { GetDwStatusType, GetTranslateSignals } from '../../pages/Judge/utils';
|
||||||
|
|
||||||
|
|
||||||
@ -194,13 +193,14 @@ class JudgeUdpBusiness {
|
|||||||
const wd = this.convertGpsCoord2(Number(msgArr[95]) || 0);
|
const wd = this.convertGpsCoord2(Number(msgArr[95]) || 0);
|
||||||
this.sendData(bytes)
|
this.sendData(bytes)
|
||||||
if (prevJd && Number(msgArr[83]) === 4) {
|
if (prevJd && Number(msgArr[83]) === 4) {
|
||||||
await examCalcGpsDistance({
|
//TODO 解决轨迹黑屏
|
||||||
jd1: prevJd,
|
// await examCalcGpsDistance({
|
||||||
wd1: preWd,
|
// jd1: prevJd,
|
||||||
jd2: jd,
|
// wd1: preWd,
|
||||||
wd2: wd,
|
// jd2: jd,
|
||||||
h: Number(msgArr[90]) || 1,
|
// wd2: wd,
|
||||||
})
|
// h: Number(msgArr[90]) || 1,
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
prevJd = jd;
|
prevJd = jd;
|
||||||
preWd = wd;
|
preWd = wd;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user