This commit is contained in:
渣渣和 2024-10-08 16:43:32 +08:00
parent 6895220cd9
commit dab44cfcc8
3 changed files with 6 additions and 6 deletions

View File

@ -181,7 +181,7 @@ class PullUp_1(BaseExercise):
# self.speak_driver.add_speak('摆幅过大')
# self.body_state = 1
if elbow_1 > 150 and elbow_2 > 150 and head_1_y > hand_1_y and head_2_y > hand_2_y:
if (elbow_1 > 150 or elbow_2 > 150) and head_1_y > hand_1_y and head_2_y > hand_2_y:
self.feedback = "上升"
self.state = 0
if self.direction == 0:
@ -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 wrist_1_y - self.initial_wrist_1_y < 50 and wrist_2_y - self.initial_wrist_2_y < 50:
if (head_1_y + 1 <= hand_1_y or head_2_y + 1 <= hand_2_y) and wrist_1_y - self.initial_wrist_1_y < 50 and wrist_2_y - self.initial_wrist_2_y < 50:
self.feedback = "下落"
if self.state == 0:
if self.direction == 1:

View File

@ -180,7 +180,7 @@ class Tricep_dip_1(BaseExercise):
# self.pre_pos = 2
# self.had_done = True
if elbow_1 <= 95 and shoulder_1_y >= elbow_1_y:
if elbow_1 <= 95 and shoulder_1_y >= elbow_1_y and wrist_1_y - self.initial_wrist_1_y < 50:
self.feedback = "上升"
if self.state == 1:
self.time += 1
@ -189,7 +189,7 @@ class Tricep_dip_1(BaseExercise):
self.state = 0
self.time = 0
if elbow_1 >= 146 and shoulder_1_y < elbow_1_y and shoulder_1_y < self.initial_wrist_1_y - 60 and shoulder_angle > 60 and self.count > 0 and wrist_1_y - self.initial_wrist_1_y < 50 and heel_y < self.heel - 5:
if elbow_1 >= 146 and shoulder_1_y < elbow_1_y and shoulder_1_y < self.initial_wrist_1_y - 60 and shoulder_angle > 60 and self.count > 0 and wrist_1_y - self.initial_wrist_1_y < 50:
self.feedback = "下落"
if self.state == 0:
self.time += 1
@ -209,7 +209,7 @@ class Tricep_dip_1(BaseExercise):
# self.pre_pos = 2
# self.had_done = True
if elbow_2 <= 93 and shoulder_2_y >= elbow_2_y:
if elbow_2 <= 93 and shoulder_2_y >= elbow_2_y and wrist_2_y - self.initial_wrist_2_y < 50:
self.feedback = "上升"
if self.state == 1:
self.time += 1
@ -218,7 +218,7 @@ class Tricep_dip_1(BaseExercise):
self.state = 0
self.time = 0
if elbow_2 >= 146 and shoulder_2_y < elbow_2_y and shoulder_2_y < self.initial_wrist_2_y - 60 and shoulder_angle > 60 and self.count > 0 and wrist_2_y - self.initial_wrist_2_y < 50 and heel_y < self.heel - 5:
if elbow_2 >= 146 and shoulder_2_y < elbow_2_y and shoulder_2_y < self.initial_wrist_2_y - 60 and shoulder_angle > 60 and self.count > 0 and wrist_2_y - self.initial_wrist_2_y < 50:
self.feedback = "下落"
if self.state == 0:
self.time += 1

Binary file not shown.