diff --git a/entry/src/main/ets/common/service/usbService.ts b/entry/src/main/ets/common/service/usbService.ts index 2d44dc05..4c2bdff5 100644 --- a/entry/src/main/ets/common/service/usbService.ts +++ b/entry/src/main/ets/common/service/usbService.ts @@ -25,10 +25,10 @@ function plcStrToWXCodeArr(wuXiDataStr){ //补齐0x00 if(oSize > 0){ let oSizeArr = [] - for(let j = 0;j < oSize;j++){oSizeArr.push(0)} - // packetArr.push([0,thisPacket.length].concat(thisPacket).concat(oSizeArr)); + for(let j = 0;j < oSize;j++){oSizeArr.push(0x00)} + packetArr.push([0x00,thisPacket.length].concat(thisPacket).concat(oSizeArr)); }else{ - packetArr.push([thisPacket.length].concat(thisPacket)); + packetArr.push([0x00,thisPacket.length].concat(thisPacket)); } } return packetArr @@ -65,10 +65,10 @@ const initUsbServicesFn = () => { const codeArr = plcStrToWXCodeArr(wuXiDataStr); // console.info(LOGTAG,firstArr) // console.info(LOGTAG,secondArr) - for(let i = 0; i < codeArr.length;i++){ try { - console.info(LOGTAG,codeArr[i]) + // const e = await usb.bulkTransfer(devicepipe, inEndpoint, new Uint8Array(codeArr[i])) + // console.info(LOGTAG,e) const f = await usb.bulkTransfer(devicepipe, outEndpoint, new Uint8Array(codeArr[i])) console.info(LOGTAG,f) } catch (e) { diff --git a/entry/src/main/ets/pages/judgeSDK/utils/judge-config.ts b/entry/src/main/ets/pages/judgeSDK/utils/judge-config.ts index 7e25ee31..7872adb9 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/judge-config.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/judge-config.ts @@ -13,7 +13,7 @@ export const judgeConfig = { //科目二 // trajectoryPath: 'logs/wu_xi_km2/0000000000001_342323199501470011_测试学员1_1970_01_01_08_39_35/judge_exam_data.txt', //科目三 - trajectoryPath: 'logs/wu_xi_km3/0000000000001_342323199501470011_测试学员1_2024_05_15_11_43_45/judge_exam_data.txt' + trajectoryPath: 'logs/0000000000001_342323199501470011_测试学员1_1970_01_01_08_32_05/judge_exam_data.txt' } //0000000000001_342323199501470011_测试学员1_2024_04_28_10_59_44