diff --git a/entry/src/main/cpp/bin/libJudgeSdk.so b/entry/src/main/cpp/bin/libJudgeSdk.so index 6703b8c9..a23526e0 100644 Binary files a/entry/src/main/cpp/bin/libJudgeSdk.so and b/entry/src/main/cpp/bin/libJudgeSdk.so differ diff --git a/entry/src/main/cpp/sdk/common/HVersion.h b/entry/src/main/cpp/sdk/common/HVersion.h index 3119f41d..61b8a0b3 100644 --- a/entry/src/main/cpp/sdk/common/HVersion.h +++ b/entry/src/main/cpp/sdk/common/HVersion.h @@ -27,7 +27,7 @@ #define JUDGE_VERSION_MAJOR 1 #define JUDGE_VERSION_MINOR 0 #define JUDGE_VERSION_PATCH 3 -#define JUDGE_VERSION_STAMP "2504251140b" +#define JUDGE_VERSION_STAMP "2504251910b" #if JUDGE_USE_OLD # undef JUDGE_VERSION_STAMP # define JUDGE_VERSION_STAMP "2411121010b.old" diff --git a/entry/src/main/cpp/sdk/database/HDBTable.h b/entry/src/main/cpp/sdk/database/HDBTable.h index d5f189aa..930b3da3 100644 --- a/entry/src/main/cpp/sdk/database/HDBTable.h +++ b/entry/src/main/cpp/sdk/database/HDBTable.h @@ -247,6 +247,7 @@ namespace sound sound_sub3(456001); // \sound\通过急弯.wav sound_sub3(458001); // \sound\通过拱桥.wav sound_sub3(zhpp); // \sound\综合评判.wav 请考官综合评判 + sound_sub3(ksjs); // \sound\考试结束.wav sound_subx(xmqx); //项目取消 diff --git a/entry/src/main/cpp/sdk/exam/ExamCarSub3.cpp b/entry/src/main/cpp/sdk/exam/ExamCarSub3.cpp index 511f968c..218d931b 100644 --- a/entry/src/main/cpp/sdk/exam/ExamCarSub3.cpp +++ b/entry/src/main/cpp/sdk/exam/ExamCarSub3.cpp @@ -1324,6 +1324,7 @@ void ExamCarSub3::Deal_KM3_Judge() } } + finishExamBroad(); //如果考试结束(训练不存在结束的概念,都是界面上点击结束考试,一般科目三都是可以重复进项目的) if(isExamMode()) //考试模式的 { @@ -5068,6 +5069,119 @@ void ExamCarSub3::dealItemNoIDEndItem() } } +void ExamCarSub3::finishExamBroad() +{ + /* + 程军华-多伦科技 2025-04-25 + 不合格的: + 302=4、5、7、8,考试模式,自动退出; + 302=1,考试模式,报:考试结束.wav + 302=3,报:考试结束.wav + + 考试完成,合格的: + 302=8,延迟n秒退出 + 302=7,自动退出 + + 靠边完成,且考试完成的: + 302=4,自动退出 + 302=5,不合格,自动退出 + 302=6,合格,自动退出 + + 考试完成,指的是必考项目完成,里程完成 + */ + + bool finish = true; + for(auto it = m_sub3Items.begin(); it != m_sub3Items.end(); it++) + { + const TKM3Item* item = it->second->getExamItem(); + if(item->Item_Color == itemStateWk || item->Item_Color == itemStateZk) + { + finish = false; + break; + } + } + + bool play_zhpp = false; + bool play_ksjs = false; + bool mileage = isMileage(); + bool qualified = isQualified(); + bool exam = isExamMode(); + const std::string& s302 = TableSysSet->get302(); + if(s302 == "0") + { + if(mileage && finish && qualified) + { + play_zhpp = true; + } + } + if(s302 == "1") + { + if(mileage && finish && qualified) + { + play_zhpp = true; + } + if(exam && !qualified) + { + play_ksjs = true; + } + } + else if(s302 == "2") + { + if(mileage && finish && qualified) + { + play_zhpp = true; + } + } + else if(s302 == "3") + { + if(mileage && finish && qualified) + { + play_zhpp = true; + } + if(!qualified) + { + play_ksjs = true; + } + } + else if(s302 == "4") + { + } + else if(s302 == "5") + { + if(mileage && finish && qualified) + { + play_zhpp = true; + } + } + else if(s302 == "6") + { + } + else if(s302 == "7") + { + } + else if(s302 == "8") + { + } + + if(play_zhpp) + { + if(!m_pub.play_finish) + { + m_pub.play_finish = true; + createEventSound({Sub3ItemType20Comm, sound::sub3_zhpp}); //请考官综合评判 + } + } + if(play_ksjs) + { + if(!m_pub.play_finish) + { + m_pub.play_finish = true; + createEventSound({Sub3ItemType20Comm, sound::sub3_ksjs}); //考试结束 + } + } + +} + bool ExamCarSub3::calcToLaneArc(const TModelLine& Lxx, const TModelPolygon& poly, const Pointi& b1, const Pointi& pt, int& dm, bool cross) { TModelLine line; diff --git a/entry/src/main/cpp/sdk/exam/ExamCarSub3.h b/entry/src/main/cpp/sdk/exam/ExamCarSub3.h index d87b8763..a0d2cb05 100644 --- a/entry/src/main/cpp/sdk/exam/ExamCarSub3.h +++ b/entry/src/main/cpp/sdk/exam/ExamCarSub3.h @@ -78,6 +78,8 @@ protected: void dealItemNoIDEndItem(); + void finishExamBroad(); + bool calcToLaneArc(const TModelLine& Lxx, const TModelPolygon& poly, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false); bool calcToLaneArc2(const TModelLine& Lxx, const TModelPolygon& area, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false); bool calcToLaneLine(const TModelLine& Lxx, const std::vector& Pts, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false); diff --git a/entry/src/main/cpp/sdk/judge/sub3/Sub3Judge11Kbtc.cpp b/entry/src/main/cpp/sdk/judge/sub3/Sub3Judge11Kbtc.cpp index 883ee378..5e0413db 100644 --- a/entry/src/main/cpp/sdk/judge/sub3/Sub3Judge11Kbtc.cpp +++ b/entry/src/main/cpp/sdk/judge/sub3/Sub3Judge11Kbtc.cpp @@ -1277,10 +1277,6 @@ void Sub3Judge11Kbtc::DoStatus_100() //ToDo: 语音提示-->请起步,继续完成考试 m_car->createEventSound({itemNo(), sound::sub3_406005}); } - else - { - m_car->createEventSound({itemNo(), sound::sub3_zhpp}); //请考官综合评判 - } } void Sub3Judge11Kbtc::Judge_KBTC_YaXian() diff --git a/entry/src/main/cpp/sdk/utility/HTypes.h b/entry/src/main/cpp/sdk/utility/HTypes.h index 4e4e418b..bc1ffc06 100644 --- a/entry/src/main/cpp/sdk/utility/HTypes.h +++ b/entry/src/main/cpp/sdk/utility/HTypes.h @@ -1596,6 +1596,8 @@ struct TPubKM3 int m_KsZgSs = 0; //记录考试中的最高时速 //int m_KsLjLc = 0; //记录考试累计里程(米) + bool play_finish = false; + }; /* diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index 75607d24..6e7aede2 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -37,7 +37,6 @@ import promptAction from '@ohos.promptAction'; struct Index { // 考试模式 1:白考,2:夜考,3:增驾(模拟灯光未考),4:增驾(模拟灯光已考),5:满分学习 private mode: number = 1 - // 夜考扣分 private isYkkf: boolean = false async aboutToDisappear() { @@ -47,9 +46,8 @@ struct Index { async aboutToAppear() { let currentParams: any = router.getParams(); this.mode = Number(currentParams.mode) - promptAction.showToast({ - message: "当前模式:" + this.mode - }) + console.log("当前模式:" + this.mode) + const time = await getCurrentTime() this.startTime = time.split(' ')[1] @@ -1171,7 +1169,7 @@ struct Index { } //只做一次的项目已经做过,后续不能人工触发 - if (param307.includes(projectCode)) { + if (param307.includes(projectCode) && this.mode !== 5) { if (this.mode === 2) { return !(ykType == '3' || ykType == '4' || projectType == '3' || projectType == '4') } else {