From e8f80b9fb4f2c33faa89dfabd8c7db4a00ec96ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A3=E6=B8=A3=E5=92=8C?= <2608761159@qq.com> Date: Thu, 10 Oct 2024 17:02:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=A9=BA=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Exercise3/pull_up_1.py | 6 +++--- Exercise3/pull_up_2.py | 2 +- Exercise3/pull_up_3.py | 2 +- Exercise3/tricep_dip.py | 2 +- LSZXBackend/exercise_backend.py | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Exercise3/pull_up_1.py b/Exercise3/pull_up_1.py index ec4fd83..b759cf1 100644 --- a/Exercise3/pull_up_1.py +++ b/Exercise3/pull_up_1.py @@ -11,7 +11,7 @@ from .base_exercise import BaseExercise class PullUp_1(BaseExercise): - def __init__(self, info, statistic_time=99999, camera=None): + def __init__(self, info, statistic_time=900, camera=None): super().__init__(info, statistic_time, camera=camera) # 个数统计 self.bar = None @@ -203,8 +203,8 @@ class PullUp_1(BaseExercise): self.direction = 0 self._time = 0 self.end_test = 0 - self.speak_driver.speed_control(320) - self.speak_driver.add_speak("{}".format(int(self.count))) + self.speak_driver.speed_control(400) + self.speak_driver.add_speak("{}".format(int(self.count))) if self.count == 1: self.initial_wrist_1_y = wrist_1_y self.initial_wrist_2_y = wrist_2_y diff --git a/Exercise3/pull_up_2.py b/Exercise3/pull_up_2.py index 4ec3cad..ef1ede3 100644 --- a/Exercise3/pull_up_2.py +++ b/Exercise3/pull_up_2.py @@ -9,7 +9,7 @@ from .base_exercise import BaseExercise class PullUp_2(BaseExercise): - def __init__(self, info, statistic_time=99999, camera=None): + def __init__(self, info, statistic_time=900, camera=None): super().__init__(info, statistic_time, camera=camera) # 个数统计 self.bar = None diff --git a/Exercise3/pull_up_3.py b/Exercise3/pull_up_3.py index 17fc7c5..171f47f 100644 --- a/Exercise3/pull_up_3.py +++ b/Exercise3/pull_up_3.py @@ -9,7 +9,7 @@ from .base_exercise import BaseExercise class PullUp_3(BaseExercise): - def __init__(self, info, statistic_time=99999, camera=None): + def __init__(self, info, statistic_time=900, camera=None): super().__init__(info, statistic_time, camera=camera) # 个数统计 self.bar = None diff --git a/Exercise3/tricep_dip.py b/Exercise3/tricep_dip.py index c893f3a..dc646de 100644 --- a/Exercise3/tricep_dip.py +++ b/Exercise3/tricep_dip.py @@ -8,7 +8,7 @@ from .base_exercise import BaseExercise class Tricep_dip_1(BaseExercise): - def __init__(self, info, statistic_time=99999, camera=None): + def __init__(self, info, statistic_time=900, camera=None): super().__init__(info, statistic_time, camera=camera) # 个数统计 self.bar = None diff --git a/LSZXBackend/exercise_backend.py b/LSZXBackend/exercise_backend.py index c60bd04..773e00b 100644 --- a/LSZXBackend/exercise_backend.py +++ b/LSZXBackend/exercise_backend.py @@ -579,6 +579,8 @@ class ExerciseBackend(LSZXBackend.base_driver.BaseDriver): _count = count _score = real_score elif self.exercise_tag in {PULLUP, TRICEDIP} and had_done == False: + # 主动清空缓存 + # 结束屏幕录制 video_name = self.project.info[ID] + '_' + self.project.info[ "name"] + '_' + self.project.exercise_type + '_' + str(real_score)