Skip to content

Commit

Permalink
ENH: add 'Lap' information to race control messages (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
formulatimer authored Nov 8, 2023
1 parent d962fa8 commit f5b4498
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fastf1/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ def race_control_messages(path, response=None, livedata=None):
- Scope (str): Scope of message "Track", "Sector", "Driver"
- Sector (int): Affected track sector for sector-scoped messages
- RacingNumber (str): Affected driver for CarEvent messages
- Lap (int): Number of the lap in which the message was displayed
Args:
path (str): api path base string (usually ``Session.api_path``)
Expand Down Expand Up @@ -1361,11 +1362,11 @@ def race_control_messages(path, response=None, livedata=None):

data = {
'Time': [], 'Category': [], 'Message': [], 'Status': [],
'Flag': [], 'Scope': [], 'Sector': [], 'RacingNumber': []
'Flag': [], 'Scope': [], 'Sector': [], 'RacingNumber': [], 'Lap': []
}
data_keys = ('Category', 'Message', 'Status', 'Flag', 'Scope', 'Sector',
'RacingNumber')
converters = (str, str, str, str, str, int, str)
'RacingNumber', 'Lap')
converters = (str, str, str, str, str, int, str, int)

for line in response:
messages = line[1]['Messages']
Expand Down

0 comments on commit f5b4498

Please sign in to comment.