Skip to content

Commit

Permalink
Update gap spec
Browse files Browse the repository at this point in the history
  • Loading branch information
HazardCreative committed Oct 20, 2023
1 parent 62a021e commit d87ab6f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vrx_tbs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ def onRaceLapRecorded(self, args):
# Pos X Lap X
# LAP 0:00.000

if info.next_rank.split_time:
if info.next_rank.diff_time:
# pilot in 2nd or self has faster lap
# Pos X Lap X
# LAP 0:00.000
# PX +0:00.000
# Callsign
osdCrosserData.text2 = POS_HEADER + str(info.next_rank.position) + ' +' + RHUtils.time_format(info.next_rank.split_time, TIME_FORMAT)
osdCrosserData.text2 = POS_HEADER + str(info.next_rank.position) + ' +' + RHUtils.time_format(info.next_rank.diff_time, TIME_FORMAT)
osdCrosserData.text3 = ' ' + info.next_rank.callsign
elif info.current.is_best_lap and info.current.lap_number:
# pilot in 1st, is best lap,
Expand All @@ -242,12 +242,12 @@ def onRaceLapRecorded(self, args):
# Pos X Lap X
# LAP 0:00.000

if info.next_rank.split_time:
if info.next_rank.diff_time:
# Pos X Lap X
# LAP 0:00.000
# PX +0:00.000
# Callsign
osdCrosserData.text2 = POS_HEADER + str(info.next_rank.position) + ' +' + RHUtils.time_format(info.next_rank.split_time, TIME_FORMAT)
osdCrosserData.text2 = POS_HEADER + str(info.next_rank.position) + ' +' + RHUtils.time_format(info.next_rank.diff_time, TIME_FORMAT)
osdCrosserData.text3 = ' ' + info.next_rank.callsign
else:
# Pos X Lap X
Expand All @@ -263,7 +263,7 @@ def onRaceLapRecorded(self, args):
self.sendLapMessage(address, osdCrosserData)

# show split when next pilot crosses
if info.next_rank.split_time:
if info.next_rank.diff_time:
if info.race.win_condition == WinCondition.FASTEST_CONSECUTIVE or info.race.win_condition == WinCondition.FASTEST_LAP:
# don't update
pass
Expand All @@ -282,7 +282,7 @@ def onRaceLapRecorded(self, args):
info.next_rank.position,
info.next_rank.lap_number,
next_rank_lap_prefix + ' ' + RHUtils.time_format(info.next_rank.last_lap_time),
POS_HEADER + str(info.current.position) + ' -' + RHUtils.time_format(info.next_rank.split_time, TIME_FORMAT),
POS_HEADER + str(info.current.position) + ' -' + RHUtils.time_format(info.next_rank.diff_time, TIME_FORMAT),
' ' + info.current.callsign
)

Expand Down

0 comments on commit d87ab6f

Please sign in to comment.