Contributing
Development Workflow
Fork the repository and create a feature branch.
Make your changes — keep commits small and focused.
Ensure all tests pass:
cmake -B build -DCMAKE_BUILD_TYPE=Debug cmake --build build --parallel cd build && ctest --output-on-failure
Run clang-tidy (optional but recommended):
clang-tidy core/*.h core/*.c telemetry/*.h telemetry/*.c \ -checks='bugprone-*' -warnings-as-errors='bugprone-*' \ -- -Icore -Itelemetry -I.
Open a pull request against
main.
Code Style
C — C11, no compiler extensions. All core logic must be platform-independent (no OS or hardware calls).
C++ — C++17. Wrappers live in
cpp/jetecu/and use thejetecunamespace.Naming —
snake_casefor C functions and types,PascalCasefor C++ classes,camelCasefor C++ methods.Include guards —
#ifndef FILE_H/#define FILE_H(no#pragma once).No dynamic allocation in core or HAL code.
Comments — Doxygen-style (
/** @brief ... */) on all public API.
Project Layout
core/ Platform-independent C core
telemetry/ Telemetry protocol (C)
cpp/jetecu/ C++17 wrappers
hal/ Hardware abstraction headers
platform/ HAL implementations (POSIX, ESP32, STM32)
sim/ PC simulator engine model
test/ Test suites (Google Test)
config/ Default JSON configuration
doc/ Sphinx + Doxygen documentation
Adding a New Module
Create
core/ecu_<name>.hwith Doxygen@defgroup.Add the implementation in
core/ecu_<name>.c.Write tests in
test/test_<name>.cpp.Add a Breathe page at
doc/api/<name>.rst.Register the test in
CMakeLists.txt.
License
JetECU-Core is licensed under Apache 2.0. By submitting a pull request you agree to license your contribution under the same terms.