Client: Fix move_start function

This commit is contained in:
Arthur Golubtsov
2019-11-02 01:16:25 +00:00
parent 576e1a52fa
commit e656498478

View File

@@ -356,7 +356,7 @@ def _command_move_start_to_current_position(*args, **kwargs):
if not math.isnan(x_start):
telem = FlightLib.get_telemetry(client.active_client.FRAME_ID)
print("x_telem = {}, y_telem = {}".format(telem.x, telem.y))
if not math.isnan(x_telem):
if not math.isnan(telem.x):
client.active_client.config.set('PRIVATE', 'x0', telem.x - x_start)
client.active_client.config.set('PRIVATE', 'y0', telem.y - y_start)
client.active_client.rewrite_config()