diff --git a/Exercise3/pull_up_1.py b/Exercise3/pull_up_1.py index bbe7b5c..56967d9 100644 --- a/Exercise3/pull_up_1.py +++ b/Exercise3/pull_up_1.py @@ -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: diff --git a/Exercise3/tricep_dip.py b/Exercise3/tricep_dip.py index 96940c6..f330ae8 100644 --- a/Exercise3/tricep_dip.py +++ b/Exercise3/tricep_dip.py @@ -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 diff --git a/Manager/complete_database.db b/Manager/complete_database.db index 2ddabb6..e4f8eba 100644 Binary files a/Manager/complete_database.db and b/Manager/complete_database.db differ