Esempio n. 1
0
 def after_lap(self, lap):
     if self.laps > 1:
         lap_time = self.lap_timer.split_time() - self.lap_times
         self.lap_times += lap_time
         hl, ml, sl = convert.seconds_to_hour_minute_seconds(lap_time)
         reporter.summarize(self.cfg, track=self.track, lap=lap)
         console.println("")
         if lap < self.laps:
             remaining = (self.laps - lap) * self.lap_times / lap
             hr, mr, sr = convert.seconds_to_hour_minute_seconds(remaining)
             console.info("Lap time %02d:%02d:%02d (ETA: %02d:%02d:%02d)" % (hl, ml, sl, hr, mr, sr), logger=logger)
         else:
             console.info("Lap time %02d:%02d:%02d" % (hl, ml, sl), logger=logger)
         console.println("")
Esempio n. 2
0
 def after_lap(self, lap):
     if self.laps > 1:
         lap_time = self.lap_timer.split_time() - self.lap_times
         self.lap_times += lap_time
         hl, ml, sl = convert.seconds_to_hour_minute_seconds(lap_time)
         reporter.summarize(self.metrics_store, self.cfg, track=self.track, lap=lap)
         console.println("")
         if lap < self.laps:
             remaining = (self.laps - lap) * self.lap_times / lap
             hr, mr, sr = convert.seconds_to_hour_minute_seconds(remaining)
             console.info("Lap time %02d:%02d:%02d (ETA: %02d:%02d:%02d)" % (hl, ml, sl, hr, mr, sr), logger=logger)
         else:
             console.info("Lap time %02d:%02d:%02d" % (hl, ml, sl), logger=logger)
         console.println("")
Esempio n. 3
0
 def after_lap(self, lap):
     if self.laps > 1:
         lap_time = self.lap_timer.split_time() - self.lap_times
         self.lap_times += lap_time
         hl, ml, sl = convert.seconds_to_hour_minute_seconds(lap_time)
         console.println("")
         if lap + 1 < self.laps:
             remaining = (self.laps - lap - 1) * self.lap_times / (lap + 1)
             hr, mr, sr = convert.seconds_to_hour_minute_seconds(remaining)
             console.info("Lap time %02d:%02d:%02d (ETA: %02d:%02d:%02d)" %
                          (hl, ml, sl, hr, mr, sr),
                          logger=logger)
         else:
             console.info("Lap time %02d:%02d:%02d" % (hl, ml, sl),
                          logger=logger)
         console.println("")
Esempio n. 4
0
 def after_lap(self, lap):
     logger.info("Finished lap [%d/%d]" % (lap, self.race.total_laps))
     if self.race.total_laps > 1:
         lap_time = self.lap_timer.split_time() - self.lap_times
         self.lap_times += lap_time
         hl, ml, sl = convert.seconds_to_hour_minute_seconds(lap_time)
         lap_results = reporter.calculate_results(self.metrics_store, self.race, lap)
         self.race.add_lap_results(lap_results)
         reporter.summarize(self.race, self.cfg, lap=lap)
         console.println("")
         if lap < self.race.total_laps:
             remaining = (self.race.total_laps - lap) * self.lap_times / lap
             hr, mr, sr = convert.seconds_to_hour_minute_seconds(remaining)
             console.info("Lap time %02d:%02d:%02d (ETA: %02d:%02d:%02d)" % (hl, ml, sl, hr, mr, sr), logger=logger)
         else:
             console.info("Lap time %02d:%02d:%02d" % (hl, ml, sl), logger=logger)
         console.println("")
Esempio n. 5
0
 def after_lap(self):
     logger.info("Finished lap [%d/%d]" % (self.current_lap, self.race.total_laps))
     if self.race.total_laps > 1:
         lap_time = self.lap_timer.split_time() - self.lap_times
         self.lap_times += lap_time
         hl, ml, sl = convert.seconds_to_hour_minute_seconds(lap_time)
         lap_results = reporter.calculate_results(self.metrics_store, self.race, self.current_lap)
         self.race.add_lap_results(lap_results)
         reporter.summarize(self.race, self.cfg, lap=self.current_lap)
         console.println("")
         if self.current_lap < self.race.total_laps:
             remaining = (self.race.total_laps - self.current_lap) * self.lap_times / self.current_lap
             hr, mr, sr = convert.seconds_to_hour_minute_seconds(remaining)
             console.info("Lap time %02d:%02d:%02d (ETA: %02d:%02d:%02d)" % (hl, ml, sl, hr, mr, sr), logger=logger)
         else:
             console.info("Lap time %02d:%02d:%02d" % (hl, ml, sl), logger=logger)
         console.println("")