From d5c3b5b5f71f7bc523c85f853f67bf89cb413bb0 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 31 Jul 2025 10:47:50 +0300 Subject: [PATCH] Bring back handling old message for motor outputs in pyflix --- tools/pyflix/flix.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/pyflix/flix.py b/tools/pyflix/flix.py index f03d948..61a91bf 100644 --- a/tools/pyflix/flix.py +++ b/tools/pyflix/flix.py @@ -173,6 +173,10 @@ class Flix: self.motors = msg.controls[:4] # type: ignore self._trigger('motors', self.motors) + # TODO: to be removed: the old way of passing motor outputs + if isinstance(msg, mavlink.MAVLink_actuator_output_status_message): + self.motors = msg.actuator[:4] # type: ignore + if isinstance(msg, mavlink.MAVLink_scaled_imu_message): self.acc = self._mavlink_to_flu([msg.xacc / 1000, msg.yacc / 1000, msg.zacc / 1000]) self.gyro = self._mavlink_to_flu([msg.xgyro / 1000, msg.ygyro / 1000, msg.zgyro / 1000])