๐ค Contributing to HardFOC TLE92466ED Driver
Thank you for your interest in contributing to the HardFOC TLE92466ED Driver! This document provides guidelines and information for contributors.
๐ Code Standards
๐ฏ Coding Style and Best Practices for HardFOC Development
- C++23 Standard Compliance - All code must be compatible with C++23
- Consistent Naming - Follow the established naming conventions:
- Classes:
PascalCase(e.g.,TLE92466ED,TLE92466ED_HAL) - Functions:
PascalCase(e.g.,SetCurrent,GetDiagnostics) - Variables:
snake_casewith trailing underscore for members (e.g.,channel_enable_,current_setting_) - Constants:
UPPER_SNAKE_CASE(e.g.,TLE92466ED_MAX_CURRENT) - Types: Hardware-agnostic types where applicable
- Classes:
๐๏ธ Architecture Guidelines
- Hardware Abstraction - Use hardware-agnostic HAL interfaces
- Error Handling - All functions use
std::expectedfor error handling - Safety - Use
noexceptwhere appropriate for safety-critical code - Dependencies - Keep dependencies minimal (freestanding where possible)
๐งช Testing
๐ง Unit Tests and Hardware Validation Requirements
- Unit Tests - Write comprehensive unit tests for all new functionality
- Hardware Testing - Test on actual TLE92466ED hardware with ESP32
- Integration Tests - Verify compatibility with existing HardFOC systems
- Performance Tests - Ensure real-time performance requirements are met
- Safety Tests - Validate safety features and error handling
๐ Documentation
๐ Documentation Standards and Updates
- API Documentation - Update documentation for all public interfaces
- User Guides - Create or update guides for new features
- Example Code - Provide working examples for solenoid control applications
- Architecture Documentation - Document design decisions and patterns
๐ Bug Reports
๐ How to Report Bugs Effectively
When reporting bugs, please include:
- Hardware Information: TLE92466ED board, ESP32 version, solenoid configuration
- Environment Details: ESP-IDF version, compiler version, operating system
- Reproduction Steps: Minimal code example, configuration settings
- Hardware Configuration: Connected peripherals, pin assignments
- Debugging Information: Error messages, log output, stack traces
โจ Feature Requests
๐ Proposing New Features and Enhancements
When proposing new features:
- Use Case - Describe the specific solenoid control use case
- Technical Specification - Provide detailed technical requirements
- API Design - Propose the interface design following established patterns
- Implementation Plan - Outline the implementation approach
- Testing Strategy - Describe how the feature will be tested
๐ Development Workflow
๐ Step-by-Step Development Process
- Fork the Repository
- Create a Feature Branch
- Implement Your Changes with HardFOC-Specific Tests
- Document Your Changes with HardFOC Examples
- Submit a Pull Request
๐ Code Quality Standards for HardFOC
- C++23 Compliance - Code compiles without warnings
- HardFOC Compatibility - Tested on HardFOC boards
- Error Handling - All error conditions handled appropriately using std::expected
- Documentation - All public APIs documented
- Tests - Adequate test coverage provided
- Performance - Real-time requirements met
๐ Thank You for Contributing to HardFOC
Your contributions help make HardFOC motor controller boards more accessible and powerful for everyone.