Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,23 @@ cargo r -p saver year-circuit.data.txt
> I recommend naming the files with the ending
> ".data.txt" as this extension is in the gitignore so you won't accidentally commit the telemetry recordings.

You can also create a recording of a past race using the generator. Just start it up and select the year, meeting, and session.

```bash
cd f1-dash/

# Run the generator
cargo r -p generator
```

> [!NOTE]
> Not all past races are available using the generator. The following races are unavailable:
> - All seasons before 2018
> - The 2018 Australian Grand Prix
> - 2020 and 2021 pre-season testing
> - The 2022 season
> - All races before Spain in 2024

## Branching Convention

For branch names we use git flow style branching.
Expand Down
131 changes: 128 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"services/importer", # bin - service
"crates/saver", # bin - util
"crates/simulator", # bin - util
"crates/generator", # lib, bin - util
]
default-members = [
"services/live",
Expand Down
13 changes: 13 additions & 0 deletions crates/generator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "generator"
version = "0.1.0"
edition = "2024"
publish = false

[dependencies]
chrono = { version = "0.4.41", features = ["alloc"] }
reqwest = { workspace = true, features = ["blocking"] }
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
data.workspace = true
inquire = "0.7.5"
17 changes: 17 additions & 0 deletions crates/generator/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generator

Generates a replay file of a chosen race that the simulator is able to read.

## Usage

```bash
cargo r -p generator
```

> [!NOTE]
> Not all past races are available using the generator. The following races are unavailable:
> - All seasons before 2018
> - The 2018 Australian Grand Prix
> - 2020 and 2021 pre-season testing
> - The 2022 season
> - All races before Spain in 2024
Loading