Commit 7f858f3b authored by Valentin Valls's avatar Valentin Valls
Browse files

Avoid negative name

- It's never not a bad idea to use it
parent e5ce7858
Pipeline #33547 passed with stages
in 126 minutes and 24 seconds
......@@ -1698,11 +1698,8 @@ class Axis:
check_encoder = (
self.config.get("check_encoder", bool, self.encoder) and self.encoder
)
dont_check_discrepancy = read_encoder_position and not check_encoder
if (
not dont_check_discrepancy
and abs(dial_initial_pos - hw_pos) > self.tolerance
):
check_discrepancy = not (read_encoder_position and not check_encoder)
if check_discrepancy and abs(dial_initial_pos - hw_pos) > self.tolerance:
raise RuntimeError(
"%s: discrepancy between dial (%f) and controller position (%f), aborting"
% (self.name, dial_initial_pos, hw_pos)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment