From f91776d747afd15284652b238963a364f03eefbb Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 22 Jul 2025 14:02:38 +0300 Subject: [PATCH] Fix controls check --- tools/pyflix/flix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pyflix/flix.py b/tools/pyflix/flix.py index 2ac6929..f6c4a85 100644 --- a/tools/pyflix/flix.py +++ b/tools/pyflix/flix.py @@ -283,7 +283,7 @@ class Flix: def set_controls(self, roll: float, pitch: float, yaw: float, throttle: float): """Send pilot's controls. Warning: not intended for automatic control""" - if -1 <= roll <= 1 and -1 <= pitch <= 1 and -1 <= yaw <= 1: + if not (-1 <= roll <= 1 and -1 <= pitch <= 1 and -1 <= yaw <= 1): raise ValueError('roll, pitch, yaw must be in range [-1, 1]') if not 0 <= throttle <= 1: raise ValueError('throttle must be in range [0, 1]')