Keep the colleague's microbu-esp32c5 tree in this repository
obu-firmware builds against vanetza-idf from microbu-esp32c5/external, but that tree was gitignored, so a clone of this repository could not build the firmware it ships. It is now committed here as ordinary files in its own folder, microbu-esp32c5/: the colleague's commit cf4b99f plus the V2X2MAP bridge's signature verification (--trust) used on the bench. Nothing is fetched from or pushed to the colleague's repository; this repository and its remotes carry everything. The folder's own .gitignore keeps build output, downloaded components and private key material out, as it did there; the committed file set is identical to that repository's tracked files. The ESP32-C5 is still flashed from obu-firmware/, which only takes vanetza-idf from microbu-esp32c5/, so the two stay separate folders. FLASHING.md says how to take a newer version of the colleague's tree (copy it over the folder, rebuild, test, commit).
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
"""
|
||||
Entry point for the V2X2MAP Setup executable (its-g5-setup.exe).
|
||||
|
||||
Runs the setup wizard; if the user checks "Bridge automatisch starten",
|
||||
launches its-g5-bridge.exe from the same directory afterwards.
|
||||
"""
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
from setup_wizard import run_wizard
|
||||
result = run_wizard()
|
||||
if result is None:
|
||||
sys.exit(0)
|
||||
|
||||
if result.get("auto_start"):
|
||||
exe_dir = os.path.dirname(
|
||||
sys.executable if getattr(sys, "frozen", False)
|
||||
else os.path.abspath(__file__)
|
||||
)
|
||||
bridge = os.path.join(exe_dir, "its-g5-bridge.exe")
|
||||
if not os.path.isfile(bridge):
|
||||
bridge = os.path.join(exe_dir, "its-g5-bridge")
|
||||
|
||||
# Pass all settings explicitly — config file may not be readable yet
|
||||
# on the very first launch (race condition / path issues).
|
||||
cmd = [bridge, "--open-browser",
|
||||
"--node-id", result["node_id"]]
|
||||
if result.get("port"):
|
||||
cmd += ["--port", result["port"]]
|
||||
for url in result.get("brokers", []):
|
||||
cmd += ["--broker", url]
|
||||
|
||||
try:
|
||||
subprocess.Popen(cmd)
|
||||
except Exception as exc:
|
||||
# tkinter root is already destroyed — use Windows MessageBox directly
|
||||
import ctypes
|
||||
ctypes.windll.user32.MessageBoxW(
|
||||
0,
|
||||
f"Could not launch its-g5-bridge.exe:\n{exc}\n\n"
|
||||
f"Make sure both EXE files are in the same folder:\n{exe_dir}",
|
||||
"V2X2MAP — Launch failed",
|
||||
0x30, # MB_ICONWARNING | MB_OK
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user