From 548c8364e269e203c880513aa39777f66b2903b6 Mon Sep 17 00:00:00 2001 From: robin_shaun Date: Sun, 3 Oct 2021 12:44:50 +0800 Subject: [PATCH] modify a bug for flight mode switch --- communication/multirotor_communication.py | 2 +- communication/rover_communication.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/communication/multirotor_communication.py b/communication/multirotor_communication.py index 409eb56..7410ab1 100644 --- a/communication/multirotor_communication.py +++ b/communication/multirotor_communication.py @@ -179,7 +179,7 @@ class Communication: self.mission = msg.data print(self.vehicle_type+'_'+self.vehicle_id+": "+msg.data) - elif not msg.data == self.flight_mode: + else: self.flight_mode = msg.data self.flight_mode_switch() diff --git a/communication/rover_communication.py b/communication/rover_communication.py index 5aeeac8..044b1a0 100644 --- a/communication/rover_communication.py +++ b/communication/rover_communication.py @@ -139,7 +139,7 @@ class Communication: self.mission = msg.data print(self.vehicle_type+'_'+self.vehicle_id+": "+msg.data) - elif not msg.data == self.flight_mode: + else: self.flight_mode = msg.data self.flight_mode_switch()