Skip to content

Commit

Permalink
refactor: refactor the remove function
Browse files Browse the repository at this point in the history
Signed-off-by: vividf <[email protected]>
  • Loading branch information
vividf committed Dec 25, 2023
1 parent 55f555f commit 61ef8f7
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,10 @@ def is_delete_operation(self, msg_array):
return self.num_of_reflectors_list and msg_array[0] < self.num_of_reflectors_list[-1]

def remove_avg_error_from_list(self):
if len(self.num_of_reflectors_list) == 1:
for i in range(min(2, len(self.num_of_reflectors_list))):
self.calibration_distance_error_list.pop()
self.calibration_yaw_error_list.pop()
self.num_of_reflectors_list.pop()
else:
for i in range(min(2, len(self.num_of_reflectors_list))):
self.calibration_distance_error_list.pop()
self.calibration_yaw_error_list.pop()
self.num_of_reflectors_list.pop()

def add_avg_error_to_list(self, msg_array):
num_of_reflectors = msg_array[0]
Expand Down

0 comments on commit 61ef8f7

Please sign in to comment.