From 4fc5ede756fb9bffbd60228d915e63f38298afeb Mon Sep 17 00:00:00 2001 From: sbtoonz Date: Sat, 21 Dec 2024 13:19:35 -0800 Subject: [PATCH] change error raise to klipper style --- scanner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scanner.py b/scanner.py index bbb0608..a341721 100644 --- a/scanner.py +++ b/scanner.py @@ -1721,7 +1721,7 @@ def _is_faulty_coordinate(self, x, y, add_offsets=False): def _check_hardware(self, sample): # Validate sample input if "data" not in sample or "freq" not in sample: - raise ValueError("Sample must contain 'data' and 'freq' keys.") + raise error("Sample must contain 'data' and 'freq' keys.") # Initialize variables on the first call if not hasattr(self, "freq_window"): @@ -3308,7 +3308,7 @@ def _generate_path(self): pa = (begin_a, pos_p) if even else (end_a, pos_p) pb = (end_a, pos_p) if even else (begin_a, pos_p) - l = (pa, pb) + line_segment = (pa, pb) if len(points) > 0 and corner_radius > 0: # We need to insert an overscan corner. Basically we insert @@ -3340,8 +3340,8 @@ def _generate_path(self): center, pos_p - corner_radius, corner_radius, 0, 90 ) - points.append(l[0]) - points.append(l[1]) + points.append(line_segment[0]) + points.append(line_segment[1]) if swap_coord: for i in range(len(points)):