How geek95dg/alfa156-headunit works
BCM is an in-car head unit whose runtime starts configured modules and presents vehicle, media, and navigation functions through dashboard displays. The principal workflow is vehicle inputs and sensors → domain modules → event-driven state and dashboard views. Separate branches cover diagnostics, camera switching, audio, connectivity, and route planning. The graph uses README claims and SOURCE INDEX references where available; unsampled implementations are represented at supported paths, with uncertain wiring omitted.
Main entry points: renderer.py Dashboard renderer · main.py Runtime entry · route_planner.py Route planner · event_bus.py Event bus
Components 30
Runtime core
- Runtime entry
main.py - Configuration
src/core/config.py - Event bus
src/core/event_bus.py - Module catalog
src/core/modules_catalog.py - Power lifecycle
src/power/power_manager.py
Dashboards
- Dashboard renderer
src/dashboard/renderer.py - Web dashboard
src/dashboard/web_viewer.py - Small display
src/dashboard/small_viewer.py - Vehicle screens
src/dashboard/screens - Dashboard themes
src/dashboard/themes/theme_base.py - Trip computer
src/dashboard/trip_computer.py
Vehicle systems
- K-Line diagnostics
src/obd/kwp2000.py - ECU protocol
src/obd/edc15c7.py - Parking sensors
src/parking/hcsr04.py - Camera switching
src/camera/camera_controller.py - Camera capture
src/camera/ahd_grabber.py - Vehicle controls
src/vehicle
Media connectivity
- Audio pipeline
src/audio - Bluetooth audio
src/multimedia/bluetooth.py - Android Auto
src/multimedia/openauto.py - Phonebook
src/multimedia/phonebook.py - Steering inputs
src/input
Travel services
- GPS tracking
src/location/gps.py - Route planner
src/trip/route_planner.py - Weather
src/weather/weather.py
Other components
- Driver
- OpenRouteService
- TomTom Traffic
- Phone
- Vehicle signals
Connections 32
- Runtime entry → Configuration: loads
main.py - Runtime entry → Module catalog: checks modules
main.py - Runtime entry → Dashboard renderer: starts
main.py - Runtime entry → Web dashboard: starts
main.py - Runtime entry → Trip computer: starts
main.py - Runtime entry → Route planner: starts
main.py - Dashboard renderer → Dashboard themes: uses
src/dashboard/renderer.py - Dashboard renderer → Vehicle screens: uses
src/dashboard/renderer.py - Dashboard renderer → Trip computer: uses
src/dashboard/renderer.py - Dashboard renderer → Web dashboard: uses
src/dashboard/renderer.py - Driver → Dashboard renderer: views
- Driver → Web dashboard: uses
- Driver → Steering inputs: operates
- Power lifecycle → Event bus: publishes state
src/power/power_manager.py - Vehicle signals → Power lifecycle: signals ignition
- Vehicle signals → Camera switching: signals gear and blinkers
src/camera/camera_controller.py - Camera switching → Camera capture: selects feed
src/camera/camera_controller.py - Camera switching → Event bus: publishes feed
src/camera/camera_controller.py - K-Line diagnostics → ECU protocol: uses protocol
src/obd/simulator.py - Parking sensors → Event bus: publishes readings
- Vehicle controls → Event bus: exchanges signals
- Bluetooth audio → Phone: streams audio
README.md - Android Auto → Driver: provides projection
README.md - Audio pipeline → Bluetooth audio: plays sources
- Phonebook → Bluetooth audio: uses connection
- Steering inputs → Event bus: dispatches actions
src/input/arduino_serial.py - GPS tracking → Route planner: provides location
- Route planner → OpenRouteService: requests directions
src/trip/route_planner.py - Route planner → TomTom Traffic: requests traffic
src/trip/route_planner.py - Weather → Dashboard renderer: feeds dashboard
- Route planner → Dashboard renderer: provides plans
src/dashboard/renderer.py - Vehicle signals → Parking sensors: supports parking