HOW TO RECORD A REFERENCE LAP
==============================

Do this once per track you want the bot to race on.
Use a GR4 car — the bot adapts for any other car automatically.

BEFORE YOU START:
-----------------
1. GT7 must be running
2. Your PS4/PS5 IP must be set in gt7bot/config.py
   PS4/PS5 → Settings → Network → View Connection Status
3. Your PC and PS4/PS5 must be on the same WiFi
4. Go to Time Trial → pick your track → pick a GR4 car
5. Drive to the start line — DO NOT cross it yet

RECORD THE LAP:
---------------
1. Open Command Prompt in your gt7bot_full directory
2. Type:
   python gt7bot/recorder.py

3. It will ask:
   Track name: (type e.g.  Monza)
   Car name:   (type e.g.  Porsche 911 GR4)

4. You will see:
   Waiting for GT7 telemetry...
   GT7 connected!
   Drive to the start line. Recording starts when you cross it...

5. Cross the start line and drive your best clean lap
   - No crashes
   - Smooth inputs
   - The better this lap, the faster the bot will be

6. When you cross the finish line recording stops automatically:
   Lap complete — 1400 samples recorded.
   Saved: gt7bot/laps/monza/reference_lap.json

EXPORT YOUR SESSION:
--------------------
After recording you can export the full session (all laps, all telemetry)
to a single JSON file for analysis:
   File → Export Session in the gt7bot GUI
   or run: python gt7bot/gui.py → Export Session button

TIPS:
-----
- Drive the lap you want the bot to copy — it piggybacks off your inputs exactly
- You can re-record anytime to improve the bot — just run recorder.py again
- Record multiple tracks — one lap each
- After recording, open gui.py, click Refresh in the track dropdown, your track appears
- JSON files work in any spreadsheet or data tool for deeper analysis

Credits: Telemetry packet offsets and decryption by Bornhall
https://github.com/Bornhall/gt7telemetry
JSON export added by gtras.co
