Merge remote-tracking branch 'refs/remotes/origin/main'

This commit is contained in:
Karan Dubey
2025-10-19 02:02:21 -05:00
3 changed files with 30 additions and 31 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -164,8 +164,6 @@ def main():
parser = argparse.ArgumentParser(
description="Simulate Raspberry Pi telemetry streaming from CSV data"
)
parser.add_argument("--data", type=str, default="ALONSO_2023_MONZA_RACE",
help="Path to telemetry CSV file")
parser.add_argument("--endpoint", type=str, default="http://localhost:8000/telemetry",
help="HPC API endpoint")
parser.add_argument("--speed", type=float, default=1.0,
@@ -176,12 +174,9 @@ def main():
args = parser.parse_args()
try:
# Handle relative paths from the project root
data_path = Path(args.data)
if not data_path.is_absolute():
# Try relative to script location first
script_dir = Path(__file__).parent.parent
data_path = script_dir / args.data
# Hardcoded CSV file location in the same folder as this script
script_dir = Path(__file__).parent
data_path = script_dir / "ALONSO_2023_MONZA_RACE.csv"
df = load_telemetry_csv(data_path)
simulate_stream(
@@ -192,8 +187,8 @@ def main():
args.end_lap
)
except FileNotFoundError:
print(f"❌ File not found: {args.data}")
print(f" Tried: {data_path}")
print(f"❌ File not found: {data_path}")
print(f" Make sure ALONSO_2023_MONZA_RACE.csv is in the scripts/ folder")
sys.exit(1)
except Exception as e:
print(f"❌ Error: {e}")