modify a bug for communication

This commit is contained in:
robin_shaun 2021-10-03 12:28:49 +08:00
parent d0bea4fdbf
commit 79defaec37
2 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,7 @@ class Communication:
def hover_state_transition(self,x,y,z,w):
if abs(x) > 0.005 or abs(y) > 0.005 or abs(z) > 0.005 or abs(w) > 0.005:
self.hover_flag = 0
self.flight_mode = 'OFFBOARD'
def cmd_callback(self, msg):
if msg.data == '':

View File

@ -188,6 +188,7 @@ class Communication:
def hover_state_transition(self,x,y,z,w):
if abs(x) > 0.005 or abs(y) > 0.005 or abs(z) > 0.005 or abs(w) > 0.005:
self.hover_flag = 0
self.flight_mode = 'OFFBOARD'
def cmd_callback(self, msg):
if msg.data == '':