mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 15:13:26 +00:00
Server: Add check_git_version parameter
This commit is contained in:
@@ -29,9 +29,10 @@ config_version = float(default='1.0')
|
||||
__many__ = preset_param
|
||||
|
||||
[CHECKS]
|
||||
check_git_version = boolean(default=True)
|
||||
check_current_position = boolean(default=True)
|
||||
# in meters
|
||||
battery_min = float(default=50.0, min=0, max=100)
|
||||
check_current_position = boolean(default=True)
|
||||
# in meters
|
||||
start_pos_delta_max = float(default=1.0, min=0)
|
||||
# in seconds
|
||||
|
||||
@@ -46,6 +46,7 @@ class ModelChecks:
|
||||
start_pos_delta_max = 1.0
|
||||
time_delta_max = 1.0
|
||||
check_current_pos = True
|
||||
check_git = True
|
||||
|
||||
@classmethod
|
||||
def column_check(cls, column, pass_context=False):
|
||||
@@ -75,6 +76,8 @@ class ModelChecks:
|
||||
|
||||
@ModelChecks.column_check("git_version")
|
||||
def check_ver(item):
|
||||
if not ModelChecks.check_git:
|
||||
return True
|
||||
return get_git_version() == item
|
||||
|
||||
|
||||
|
||||
@@ -90,8 +90,9 @@ class ExitMsgbox(logging.Handler):
|
||||
class ServerQt(Server):
|
||||
def load_config(self):
|
||||
super().load_config()
|
||||
table.ModelChecks.battery_min = self.config.checks_battery_min
|
||||
table.ModelChecks.check_git = self.config.checks_check_git_version
|
||||
table.ModelChecks.check_current_pos = self.config.checks_check_current_position
|
||||
table.ModelChecks.battery_min = self.config.checks_battery_min
|
||||
table.ModelChecks.start_pos_delta_max = self.config.checks_start_pos_delta_max
|
||||
table.ModelChecks.time_delta_max = self.config.checks_time_delta_max
|
||||
|
||||
|
||||
Reference in New Issue
Block a user