Simplify lambdas

This commit is contained in:
artem30801
2019-11-03 20:07:29 +03:00
parent a18cb2afe6
commit 4c5139e8a2
2 changed files with 4 additions and 4 deletions

View File

@@ -111,15 +111,15 @@ class CopterDataModel(QtCore.QAbstractTableModel):
def flip_ready(self, contents=()):
contents = contents or self.data_contents
return filter(lambda x: flip_checks(x), contents) # possibly change as takeoff checks
return filter(flip_checks, contents) # possibly change as takeoff checks
def calibrating(self, contents=()):
contents = contents or self.data_contents
return filter(lambda x: calibrating_check(x), contents)
return filter(calibrating_check, contents)
def calibration_ready(self, contents=()):
contents = contents or self.data_contents
return filter(lambda x: calibration_ready_check(x), contents)
return filter(calibration_ready_check, contents)
def get_row_index(self, row_data):
try:

View File

@@ -556,7 +556,7 @@ class MainWindow(QtWidgets.QMainWindow):
@messaging.message_callback("telem")
def get_telem_data(*args, **kwargs):
message = kwargs.get("message", None)
message = kwargs.get("value")
window.update_table_data(message)