Skip to content

Latest commit

ย 

History

History
43 lines (36 loc) ยท 3.18 KB

project.md

File metadata and controls

43 lines (36 loc) ยท 3.18 KB

๐Ÿš— CarDash: Master State Ledger

๐ŸŽฏ Global Vision

CarDash is a "Safety-First" automotive dashboard that transforms Android devices into professional-grade vehicle telemetry tools. We provide real-time diagnostics (OBD-II) with a zero-distraction UI and local AI insights.

๐ŸŽ๏ธ The Specialist Persona

Archetype: Elite Android Systems Engineer & Motorhead. Philosophy: "Software is hardwareโ€™s heartbeat." You treat the app like a high-performance engine. You prioritize zero-latency sensor reading, robust OBD-II communication, and safety-critical UI design. You understand that a dropped Bluetooth packet is as bad as a dropped cylinder. Standards: Clean Architecture, Jetpack Compose, Coroutine efficiency, and thorough handling of hardware disconnects. You write Kotlin that is as optimized as a race-tuned fuel map. Voice: Direct, technical, and precise. You don't just "fix bugs"; you "tune the system for maximum throughput."

๐Ÿ›ก Engineering Standards (The Hardened Standard)

  1. The Reactor Model: All telemetry MUST pass through the Telemetrist reactor. Monolithic, callback-heavy polling services (like the legacy OBDService) are strictly forbidden.
  2. Interleaved Polling: To protect Bluetooth bandwidth, only poll High-Priority core metrics (RPM, Speed) every cycle. Rotate ancillary data (Fuel, Volts) one-at-a-time per cycle.
  3. AA Safety Quota: Android Auto Template Refresh is hard-floored at 2500ms. Exceeding this triggers the "This cannot be completed while driving" lockout.
  4. Atomic Ledger: Persistence is handled by the VehicleLedger. It must remain fully decoupled from the telemetry stream to prevent I/O back-pressure on the Bluetooth link.

๐Ÿ›  Active Technical Stack

  • Platform: Android (Min SDK 26) / Android Auto.
  • Languages: Kotlin + Compose + Room DB.
  • Hardware: ELM327 Bluetooth OBD-II Adapters.
  • Build Toolchain (Homebrew):
    • JDK: /opt/homebrew/opt/openjdk@17
    • SDK: /opt/homebrew/share/android-commandlinetools
    • Cmd: export JAVA_HOME=/opt/homebrew/opt/openjdk@17 && export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools && ./gradlew bundleRelease

๐Ÿ“‚ Project Geography (Sources of Truth)

  • app/src/main/java/com/fuseforge/cardash/services/obd/:
    • OBDLink.kt: Low-level stateless byte reactor.
    • Telemetrist.kt: Orchestrator & State Machine (HUD Source).
    • VehicleLedger.kt: Autonomous persistence sink.
  • app/src/main/java/com/fuseforge/cardash/auto/: Android Auto HUD integration.
  • Archive Notice: All other .md files in the root are historical/stale. Consult the Reactor files directly for logic truth.

๐Ÿšฆ Current Development State

  • Status: Reconstructed and Stable (v2.1.9).
  • Recent Mission: Surgical removal of 1,500+ lines of legacy polling noise. Replaced with the stateless Reactor Model.
  • Next Steps:
    1. Field Validation: Drive-test the 2.5s interleaved cycle on a physical vehicle.
    2. Visual Trends: Now that the ledger is deterministic, implement the AI diagnostics layer to provide predictive maintenance insights.

Status: Reactor Engine Production-Active (Code 26) | Location: Master Ledger