From 9a00408ac354c06c88f25dd2af7b6675b4928642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A3=E6=B8=A3=E5=92=8C?= <2608761159@qq.com> Date: Tue, 8 Oct 2024 09:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E4=BD=93=E5=90=91=E4=B8=8A=E8=A1=A5?= =?UTF-8?q?=E4=B8=81=EF=BC=88=E5=8D=95=E6=89=8B=E4=BC=91=E6=81=AF=E3=80=81?= =?UTF-8?q?=E8=AF=AF=E5=88=A4=E7=BB=93=E6=9D=9F=EF=BC=89+=20=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E5=BD=95=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Exercise3/pull_up_1.py | 5 +++-- LSZXBackend/exercise_backend.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Exercise3/pull_up_1.py b/Exercise3/pull_up_1.py index fe29475..21e6d3d 100644 --- a/Exercise3/pull_up_1.py +++ b/Exercise3/pull_up_1.py @@ -167,7 +167,7 @@ class PullUp_1(BaseExercise): if wrist_1_y - self.initial_wrist_1_y > 50 and wrist_2_y - self.initial_wrist_2_y > 50 and self.pre_pos == 1: self.end_test += 1 - if self.end_test > 2: + if self.end_test > 10: self.speak_driver.add_speak("双手已离开单杠,考试结束") self.pre_pos = 2 self.had_done = True @@ -192,7 +192,7 @@ class PullUp_1(BaseExercise): self._time = 0 self.body_state = 0 - if head_1_y < hand_1_y or head_2_y < hand_2_y and not self.had_done: + if (head_1_y < hand_1_y or head_2_y < hand_2_y) and wrist_1_y - self.initial_wrist_1_y < 50 and wrist_2_y - self.initial_wrist_2_y < 50 and not self.had_done: self.feedback = "下落" if self.state == 0: if self.direction == 1: @@ -202,6 +202,7 @@ class PullUp_1(BaseExercise): self.count += 0.5 self.direction = 0 self._time = 0 + self.end_test = 0 if self.count % 1 == 0: self.speak_driver.speed_control(320) self.speak_driver.add_speak("{}".format(int(self.count))) diff --git a/LSZXBackend/exercise_backend.py b/LSZXBackend/exercise_backend.py index 79bb4c0..dfe60d4 100644 --- a/LSZXBackend/exercise_backend.py +++ b/LSZXBackend/exercise_backend.py @@ -488,7 +488,7 @@ class ExerciseBackend(LSZXBackend.base_driver.BaseDriver): video_name = self.project.info[ID] + '_' + self.project.info[ "name"] + '_' + self.project.exercise_type + '_' + 'unknow' # 开始屏幕录制 - video_recorder.write_start(video_name) + # video_recorder.write_start(video_name) self.project.start() self.project.waiting_for_start() # 清空传送管理端的成绩 @@ -522,7 +522,7 @@ class ExerciseBackend(LSZXBackend.base_driver.BaseDriver): video_name = self.project.info[ID] + '_' + self.project.info[ "name"] + '_' + self.project.exercise_type + '_' + str(real_score) # 结束屏幕录制 - video_recorder.write_stop(video_name) + # video_recorder.write_stop(video_name) self.synchronization_info[self.exercise_tag] = {} self.send_score_signal.set() # self.send_sql_score_signal.set()