Easily read data from Forza Horizon 6's Data Out Telemetry
| src/fh6 | init | |
| .gitignore | init | |
| .python-version | init | |
| LICENSE | init | |
| pyproject.toml | init | |
| README.md | init | |
| uv.lock | init | |
fh6
Easily read data from Forza Horizon 6's Data Out Telemetry
Usage
from fh6 import Telemetry
import time
# Callback called each time a packet is received
def my_function(data):
speed_mph = data.speed * 2.236936
print(f"Speed: {speed_mph:6.1f} mph | Gear: {data.gear}")
# Start the listener
telemetry = Telemetry(port=6767)
telemetry.start(callback=my_function)
try:
# Keep the script running with your own loop
while True:
time.sleep(1)
except KeyboardInterrupt:
# Clean up, closes socket and stops the listener thread
telemetry.stop()