From f5b449892b19a17207466fed3ad7631f65a82c4f Mon Sep 17 00:00:00 2001 From: manpean <71012769+manpean@users.noreply.github.com> Date: Wed, 8 Nov 2023 20:22:20 +0100 Subject: [PATCH] ENH: add 'Lap' information to race control messages (#475) --- fastf1/_api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fastf1/_api.py b/fastf1/_api.py index 0a1997519..a2308e51e 100644 --- a/fastf1/_api.py +++ b/fastf1/_api.py @@ -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``) @@ -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']