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()