def CalcAndUpdateLap(self, dbTime, index): lap = self.CalcLap(dbTime, index) if lap != None: db_utils.update_from_dict(self.db, "times", {'id':dbTime['id'], "lap"+str(index+1):lap}, commit_flag = False) self.commit_flag = True return True return False
def CalcAndUpdateTime(self, dbTime, index): time = self.CalcTime(dbTime, index) if time != None: db_utils.update_from_dict(self.db, "times", {'id':dbTime['id'], "time"+str(index+1):time}, commit_flag = False) self.commit_flag = True return time return time
def CalcAndUpdatePoints(self, tabTime, index): points = self.CalcPoints(tabTime, index) if points != None: db_utils.update_from_dict(self.db, "times", {'id':dbTime['id'], lapX:lap}, commit_flag = False) return True return False