Repository navigation
Contributing
Thank you for your interest in contributing to the Alteriom painlessMesh library!
- Main Contributing Guide - Complete contribution guidelines
- Documentation Guide - How to contribute to documentation
- Code Style Guide - Arduino library standards
- Testing Guide - Testing infrastructure and practices
- Docker Testing - Containerized testing environment
There are many ways to contribute to painlessMesh:
Found a bug? Open an issue with:
- Hardware (ESP32/ESP8266 model)
- Library version
- Minimal code to reproduce
- Expected vs actual behavior
- Debug output
Have an idea? Start a discussion or open an issue with:
- Clear use case
- Proposed API/interface
- Implementation considerations
- Compatibility impact
Documentation improvements are always welcome:
- Fix typos or unclear explanations
- Add examples and tutorials
- Improve API documentation
- Translate documentation
See the Documentation Guide for details.
Contributing code:
- Fork the repository
-
Create a branch:
git checkout -b feature/my-feature - Make changes: Follow our code style
- Test: Run the test suite
- Commit: Use descriptive commit messages
-
Push:
git push origin feature/my-feature - Pull Request: Describe your changes
All code contributions should:
- Follow Arduino library guidelines
- Include tests where applicable
- Compile without warnings on ESP32 and ESP8266
- Include comments for complex logic
- Update documentation as needed
Before submitting:
# Build tests
cmake -G Ninja .
ninja
# Run tests
run-parts --regex catch_ bin/
# Test Arduino examples
# Use Arduino IDE or PlatformIO to verify examples compileSee Testing Guide for comprehensive testing instructions.
Required Tools:
- Git
- CMake 3.10+
- Ninja build system
- GCC/Clang compiler
- Arduino IDE or PlatformIO
Optional Tools:
- Docker (for containerized testing)
- Python 3.6+ (for scripts)
- Node.js (for npm package development)
Clone and Build:
git clone https://github.com/Alteriom/painlessMesh.git
cd painlessMesh
# Initialize submodules
git submodule update --init
# Build
cmake -G Ninja .
ninja
# Run tests
run-parts --regex catch_ bin/Use descriptive branch names:
-
feature/broadcast-ota- New features -
fix/memory-leak- Bug fixes -
docs/mqtt-guide- Documentation -
refactor/clean-api- Code improvements -
test/coverage-boost- Test additions
Follow conventional commits:
type(scope): brief description
Longer explanation if needed.
Fixes #123
Types:
-
feat: New feature -
fix: Bug fix -
docs: Documentation -
style: Code style (formatting) -
refactor: Code refactoring -
test: Tests -
chore: Build/tooling
Examples:
feat(ota): add broadcast OTA distribution
Implements chunk-based OTA distribution across mesh network
with 98% traffic reduction for large meshes.
Fixes #42
fix(mqtt): correct topic sanitization
Node IDs with special characters were causing MQTT
subscription failures. Now properly escapes characters.
Fixes #56
- Memory: ~320KB RAM available
- Use PSRAM where available
- Test with WiFi library v2.0.0+
- Consider dual-core implications
- Memory: ~80KB RAM (limited!)
- Be extra careful with memory allocation
- Test with Arduino Core 3.0.0+
- Avoid large stack allocations
- Use 2-space indentation
- Opening braces on same line
- Use
camelCasefor functions - Use
PascalCasefor classes - Use
UPPER_CASEfor constants
- Provide
.inoexamples - Use
setup()andloop()pattern - Include helpful Serial output
- Add comments explaining hardware setup
#ifndef PAINLESSMESH_FEATURE_HPP
#define PAINLESSMESH_FEATURE_HPP
// Code here
#endif // PAINLESSMESH_FEATURE_HPP- Code compiles on ESP32 and ESP8266
- Tests pass
- Documentation updated
- Examples updated (if API changed)
- CHANGELOG.md updated
- No merge conflicts with main
## Description
What does this PR do?
## Motivation
Why is this change needed?
## Changes
- Changed X to Y
- Added Z feature
- Fixed W bug
## Testing
How was this tested?
## Checklist
- [ ] Code compiles without warnings
- [ ] Tests pass
- [ ] Documentation updated
- [ ] Examples work
- [ ] CHANGELOG updated- Automated checks run (build, tests, linting)
- Maintainer review (usually within 1 week)
- Feedback addressed
- Approval and merge
- Be kind and courteous
- Accept constructive criticism
- Focus on the issue, not the person
- Help others learn
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and ideas
- Pull Requests - Code contributions
Stuck? Need help contributing?
- Check the FAQ
- Ask in Discussions
- Review existing PRs
- Read the complete contributing guide
By contributing, you agree that your contributions will be licensed under the LGPL-3.0 License.
See LICENSE for details.
Your contributions make painlessMesh better for everyone. We appreciate your time and effort!
- Main Contributing Guide - Complete guidelines
- Documentation Guide - Documentation standards
- Testing Guide - Testing practices
- Release Guide - Release process
- Code of Conduct - Community standards (if exists)