How kakkun61/okdcc works
Main Components
• Embedded Monitor Application – Located under app/monitor. This is the main executable that integrates with the hardware.
• Hardware Subsystem – Under app/monitor/hardware you find design files (KiCad projects), which represent the physical aspects.
• Core Logic Module – In the logic folder. Contains the internal algorithms and control systems.
• Electric/Driver Module – In the electric folder. Contains lower-level drivers and electrical control functionalities.
• User Interface Module – In the ui folder. Manages the display/UI aspects probably leveraging the LVGL library.
• External Dependencies – “lib/lvgl” for graphical user interface elements and “lib/munit” for testing.
• Testing & Mocks – The test directories and the mock folder (e.g., mock/x11), which assist in both unit testing and simulation of different environments.
• Documentation & Build Infrastructure – The doc folder, CMakeLists on various modules, platformio.ini, and other configuration files that define builds and integration pipelines.
Relationships and Interactions Among Components
• The Embedded Monitor Application acts as the orchestrator. It calls into:
• The Logic Module for the main decision-making and processing.
• The UI Module to drive display interactions.
• The Electric Module to perform hardware control functions.
• The Logic Module may interoperate with both the UI and Electric modules to carry out its algorithms.
• The Testing components validate the functionalities of these modules. Mocks help simulate external systems (like an X11 display).
• External libraries (e.g., LVGL) integrate with the UI module, and testing frameworks (munit) support unit tests.
• Platform-specific manifests (library.json, library.properties) ensure compatibility with PlatformIO and Arduino ecosystems.
Architectural Patterns and Design Principles
• Modularization: Clear separation of concerns into distinct directories (app, logic, ui, electric) shows adherence to modular design.
• Layering: The system isolates hardware interfacing, business logic, and UI presentation into separate layers.
• Testability: The presence of dedicated test and mock directories suggests an emphasis on unit and integration testing.
• Cross-Platform Considerations: Use of mocks and multi-platform build files (PlatformIO and Arduino manifests) indicate support for diverse environments.