mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-06-02 10:09:32 +00:00
Fix telem (2)
This commit is contained in:
@@ -131,8 +131,8 @@ def check_start_pos(item, context):
|
||||
if context.current_position is None:
|
||||
return item != 'NO_POS' # maybe should return true
|
||||
|
||||
delta = get_distance(get_position(context.current_position[:2]),
|
||||
get_position(context.start_position[:2]))
|
||||
delta = get_distance(get_position(context.current_position),
|
||||
get_position(context.start_position))
|
||||
if math.isnan(delta):
|
||||
return False
|
||||
|
||||
@@ -141,7 +141,7 @@ def check_start_pos(item, context):
|
||||
|
||||
def get_position(position):
|
||||
if position != 'NO_POS' and position[0] != 'nan': # float('nan')?
|
||||
return position
|
||||
return position[:2]
|
||||
return [float('nan')] * 3
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user