mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-06-07 04:29:33 +00:00
Server: Add check_current_position parameter to config
This commit is contained in:
@@ -45,6 +45,7 @@ class ModelChecks:
|
||||
battery_min = 50.0
|
||||
start_pos_delta_max = 1.0
|
||||
time_delta_max = 1.0
|
||||
check_current_pos = True
|
||||
|
||||
@classmethod
|
||||
def column_check(cls, column, pass_context=False):
|
||||
@@ -111,6 +112,8 @@ def check_selfcheck(item):
|
||||
|
||||
@ModelChecks.column_check("current_position")
|
||||
def check_pos(item):
|
||||
if not ModelChecks.check_current_pos:
|
||||
return True
|
||||
if item == 'NO_POS':
|
||||
return False
|
||||
return not math.isnan(item[0])
|
||||
|
||||
Reference in New Issue
Block a user