fix: 优化四合一视频丢失几秒钟
This commit is contained in:
parent
fca8d0ed08
commit
99d58fae54
@ -378,7 +378,11 @@ export class BaseJudge {
|
||||
let user = USER[0]
|
||||
user.kssycs = currentKssycs.toString()
|
||||
dConsole.info(JudgeTag, `更新后学员信息`, user)
|
||||
try {
|
||||
await UpdateTableByArray('USER', [user])
|
||||
} catch (e) {
|
||||
dConsole.error(JudgeTag, `更新学员信息失败`, e)
|
||||
}
|
||||
dConsole.info(JudgeTag, `考试成绩:${judgeUI.totalScore}`)
|
||||
if (!singlePlay) {
|
||||
// await uploadProgressData();
|
||||
@ -401,7 +405,7 @@ export class BaseJudge {
|
||||
dConsole.log(JudgeTag, "考试结束自动退出2")
|
||||
router.back();
|
||||
})
|
||||
throw new Error('End Loop')
|
||||
// throw new Error('End Loop')
|
||||
}
|
||||
that.avPlayer?.playAudio([`voice/${kf.markcatalog}.mp3`])
|
||||
} else {
|
||||
@ -410,12 +414,13 @@ export class BaseJudge {
|
||||
dConsole.log(JudgeTag, "考试结束自动退出3")
|
||||
router.back();
|
||||
})
|
||||
throw new Error('End Loop')
|
||||
// throw new Error('End Loop')
|
||||
}
|
||||
})
|
||||
this.isUdpEnd = true
|
||||
try {
|
||||
if (!judgeUI.singlePlay) {
|
||||
console.log("四合一结束1")
|
||||
let startTime: Date = AppStorage.get("startTime") || new Date()
|
||||
DifferentialAndSignal.sendMsg({ type: WorkerMessageDataType.JudgeSend, data: {
|
||||
judgeUdpEnd: this.isUdpEnd,
|
||||
@ -446,6 +451,7 @@ export class BaseJudge {
|
||||
this.isUdpEnd = true
|
||||
try {
|
||||
if (!judgeUI.singlePlay) {
|
||||
console.log("四合一结束2")
|
||||
let startTime: Date = AppStorage.get("startTime") || new Date()
|
||||
DifferentialAndSignal.sendMsg({ type: WorkerMessageDataType.JudgeSend, data: {
|
||||
judgeUdpEnd: this.isUdpEnd,
|
||||
|
||||
@ -140,6 +140,7 @@ export default class JudgeBusiness {
|
||||
}
|
||||
|
||||
private onUdpMessageCallback = (data: string) => {
|
||||
dConsole.log(JudgeTag, '收到UDP数据', data)
|
||||
const result: WorkerBackMessage = JSON.parse(data)
|
||||
if (result.type === WorkerBackMessageType.ObtainUdpData) {
|
||||
this.HandlePLCData(result.data as string)
|
||||
|
||||
@ -15,7 +15,7 @@ import { OverWriteFile, ReadFileContent } from '../utils/Common';
|
||||
struct TerminalInfoPage {
|
||||
@State config: EnvironmentConfigurationType = {
|
||||
version: "2024.08.21.01",
|
||||
judgeVersion: "2024.08.1"
|
||||
judgeVersion: "2024.08.24.1"
|
||||
}
|
||||
@State isProcessing: boolean = false;
|
||||
@State IpConfigFilePath: string = GlobalConfig.commonFileWriteAddress + '/config/ipConfig.txt'
|
||||
@ -30,7 +30,7 @@ struct TerminalInfoPage {
|
||||
this.config.version = "2024.08.21.01"
|
||||
}
|
||||
if (!this.config.judgeVersion) {
|
||||
this.config.judgeVersion = "2024.08.1"
|
||||
this.config.judgeVersion = "2024.08.24.1"
|
||||
}
|
||||
AppStorage.setOrCreate<EnvironmentConfigurationType>("EnvironmentConfiguration", this.config)
|
||||
}
|
||||
|
||||
@ -59,7 +59,12 @@ class JudgeUdpBusiness {
|
||||
const ascsbxhArr = StringToASCII(this.getSbxh(this.business.xmdm, this.business.xmxh))
|
||||
|
||||
const plcData = await this.getPlcData(msg);
|
||||
const plc2Data = await this.getPlcData(gps2 || "")
|
||||
let plc2Data: PLCDataType | undefined = undefined;
|
||||
try {
|
||||
plc2Data = await this.getPlcData(gps2 || "")
|
||||
} catch (e) {
|
||||
console.log(JSON.stringify(e))
|
||||
}
|
||||
let param: number[] = [plcData.sensor.zfxd, plcData.sensor.yfxd, plcData.sensor.shtd, plcData.sensor.ygd, plcData.sensor.jgd, plcData.sensor.skd, plcData.sensor.dh1, plcData.sensor.dh2, plcData.sensor.lhq, plcData.sensor.jsc, plcData.sensor.ssc, plcData.sensor.fsc, plcData.sensor.lb, plcData.sensor.mkg, plcData.sensor.aqd]
|
||||
.concat(GetDwStatusType(plcData.sensor.dw))
|
||||
.concat([0, 0, plcData.sensor.ygq, plcData.sensor.wd, 0])
|
||||
@ -70,8 +75,8 @@ class JudgeUdpBusiness {
|
||||
let translateGps2Jd: number = 0
|
||||
let translateGps2Wd: number = 0
|
||||
if (gps2) {
|
||||
translateGps2Jd = Number(this.convertGpsCoord2(plc2Data.gps.wd).toFixed(gpsDigit)) * Math.pow(10, gpsDigit);
|
||||
translateGps2Wd = Number(this.convertGpsCoord2(plc2Data.gps.jd).toFixed(gpsDigit)) * Math.pow(10, gpsDigit)
|
||||
translateGps2Jd = Number(this.convertGpsCoord2(plc2Data!.gps.wd).toFixed(gpsDigit)) * Math.pow(10, gpsDigit);
|
||||
translateGps2Wd = Number(this.convertGpsCoord2(plc2Data!.gps.jd).toFixed(gpsDigit)) * Math.pow(10, gpsDigit)
|
||||
}
|
||||
|
||||
const translateProjects = translateProject.map(numStr => NumberToByteArray(parseInt(numStr, 2), 8)[0])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user