forked from xtdrone/XTDrone
modify a bug for flight mode switch
This commit is contained in:
parent
79defaec37
commit
548c8364e2
|
@ -179,7 +179,7 @@ class Communication:
|
||||||
self.mission = msg.data
|
self.mission = msg.data
|
||||||
print(self.vehicle_type+'_'+self.vehicle_id+": "+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 = msg.data
|
||||||
self.flight_mode_switch()
|
self.flight_mode_switch()
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ class Communication:
|
||||||
self.mission = msg.data
|
self.mission = msg.data
|
||||||
print(self.vehicle_type+'_'+self.vehicle_id+": "+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 = msg.data
|
||||||
self.flight_mode_switch()
|
self.flight_mode_switch()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue