Compare commits
2 Commits
a1d348f1c2
...
e573544b5c
| Author | SHA1 | Date | |
|---|---|---|---|
| e573544b5c | |||
| e5baf451a6 |
@ -91,7 +91,7 @@ export default class TcpClient {
|
|||||||
let promise = this.tcp.connect({
|
let promise = this.tcp.connect({
|
||||||
address: {
|
address: {
|
||||||
address: this.oppositeIp, port: parseInt(this.oppositeIpPort), family: 1
|
address: this.oppositeIp, port: parseInt(this.oppositeIpPort), family: 1
|
||||||
}, timeout: 6000
|
}, timeout: 1000 * 15
|
||||||
});
|
});
|
||||||
promise.then(() => {
|
promise.then(() => {
|
||||||
this.tcp.setExtraOptions({
|
this.tcp.setExtraOptions({
|
||||||
|
|||||||
@ -62,7 +62,7 @@ struct Index {
|
|||||||
private context = getContext(this) as common.UIAbilityContext;
|
private context = getContext(this) as common.UIAbilityContext;
|
||||||
private serviceExtProxy: IdlServiceExtProxy
|
private serviceExtProxy: IdlServiceExtProxy
|
||||||
@State judgeVersion: string = ""
|
@State judgeVersion: string = ""
|
||||||
private version: string = "2025.05.09.01"
|
private version: string = judgeConfig.version
|
||||||
|
|
||||||
@Styles
|
@Styles
|
||||||
commStyle(){
|
commStyle(){
|
||||||
|
|||||||
@ -3,8 +3,9 @@ import Judge from '../../judgeSDK/utils/judgeReal';
|
|||||||
import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d';
|
import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d';
|
||||||
import common from '@ohos.app.ability.common';
|
import common from '@ohos.app.ability.common';
|
||||||
import {
|
import {
|
||||||
examJudgeMapSetScaling
|
examJudgeMapSetScaling, examJudgeVersion
|
||||||
} from '../../judgeSDK/api'
|
} from '../../judgeSDK/api'
|
||||||
|
import { judgeConfig } from '../../judgeSDK/utils/judgeConfig';
|
||||||
|
|
||||||
interface RoadDataType {
|
interface RoadDataType {
|
||||||
name: string,
|
name: string,
|
||||||
@ -30,6 +31,8 @@ export default struct RealTime {
|
|||||||
@State ratio: number = 1
|
@State ratio: number = 1
|
||||||
@State lane: Object = {}
|
@State lane: Object = {}
|
||||||
@State timer:number = 0
|
@State timer:number = 0
|
||||||
|
@State version: string = ""
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
@ -67,22 +70,28 @@ export default struct RealTime {
|
|||||||
|
|
||||||
Column() {
|
Column() {
|
||||||
if (this.draw) {
|
if (this.draw) {
|
||||||
XComponent({
|
Stack({ alignContent: Alignment.TopEnd }) {
|
||||||
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变
|
XComponent({
|
||||||
type: 'surface',
|
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变
|
||||||
libraryname: 'JudgeSdk'
|
type: 'surface',
|
||||||
// libraryname: 'judgesdk'
|
libraryname: 'JudgeSdk'
|
||||||
})
|
|
||||||
.width(this.widthNumber)
|
|
||||||
.height(this.heightNumber)
|
|
||||||
.onLoad(() => {
|
|
||||||
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制
|
|
||||||
})
|
|
||||||
.onDestroy(() => {
|
|
||||||
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制
|
|
||||||
this.draw = false;
|
|
||||||
clearInterval(globalThis.realTimer)
|
|
||||||
})
|
})
|
||||||
|
.width(this.widthNumber)
|
||||||
|
.height(this.heightNumber)
|
||||||
|
.onLoad(() => {
|
||||||
|
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制
|
||||||
|
})
|
||||||
|
.onDestroy(() => {
|
||||||
|
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制
|
||||||
|
this.draw = false;
|
||||||
|
clearInterval(globalThis.realTimer)
|
||||||
|
})
|
||||||
|
|
||||||
|
}.width(this.widthNumber)
|
||||||
|
.height(this.heightNumber)
|
||||||
|
Row() {
|
||||||
|
Text(this.version).margin({ right: 10 }).fontSize(14).fontColor(0x333333)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Column() {
|
Column() {
|
||||||
}
|
}
|
||||||
@ -109,6 +118,8 @@ export default struct RealTime {
|
|||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
}
|
}
|
||||||
async aboutToAppear() {
|
async aboutToAppear() {
|
||||||
|
this.version = (await examJudgeVersion()) + "/" + judgeConfig.version
|
||||||
|
|
||||||
const judge = new Judge(this)
|
const judge = new Judge(this)
|
||||||
let timer = setInterval(()=>{
|
let timer = setInterval(()=>{
|
||||||
this.lane = globalThis.laneData;
|
this.lane = globalThis.laneData;
|
||||||
|
|||||||
@ -745,7 +745,7 @@ export default class Judge {
|
|||||||
const sdkver = await examJudgeVersion();
|
const sdkver = await examJudgeVersion();
|
||||||
const initInfo = {
|
const initInfo = {
|
||||||
sdkver,
|
sdkver,
|
||||||
appver: globalThis.version,
|
appver: judgeConfig.version,
|
||||||
kskm: examSubject * 1,
|
kskm: examSubject * 1,
|
||||||
kchp: plateNo,
|
kchp: plateNo,
|
||||||
kchm: carId * 1,
|
kchm: carId * 1,
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
//考试回放开关
|
//考试回放开关
|
||||||
export const judgeConfig = {
|
export const judgeConfig = {
|
||||||
|
// 外壳版本号
|
||||||
|
version: "2025.05.15.01",
|
||||||
//本地目录开关
|
//本地目录开关
|
||||||
isTrajectoryOpen: false,
|
isTrajectoryOpen: false,
|
||||||
//是否开启拍照
|
//是否开启拍照
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user