Contributing
Thanks for your interest in NeuroFocus. We welcome contributions from the community.Ways to Contribute
Report Issues
Found a bug? Let us know:- Check existing issues first
- Create a new issue with:
- Clear title
- Steps to reproduce
- Expected vs actual behavior
- Your hardware/software setup
Suggest Features
Have an idea? Open an issue with:- Use case description
- How it would work
- Why it’s useful
Submit Code
Ready to code? Follow this process:- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Development Setup
Requirements
- PlatformIO
- Git
- NeuroFocus V4 hardware (for testing)
Clone and Build
Project Structure
Coding Standards
Style Guide
General:- Use clear variable names
- Add comments for complex logic
- Keep functions small and focused
- Use camelCase for variables
- Use PascalCase for classes
- Use UPPER_CASE for constants
Documentation
Comment your code:- Update API reference for new functions
- Add usage examples
- Update architecture docs if needed
Testing
Hardware Testing
Before submitting:- Build and upload to device
- Test all commands (b, s, v)
- Verify data streaming works
- Check for error messages
Serial Mode Testing
- Streaming starts/stops correctly
- Commands work as expected
- No crashes or hangs
BLE Mode Testing
- Device advertises correctly
- Connects and streams data
- Handles disconnection gracefully
- Commands work via BLE
Pull Request Process
Before Submitting
- Code builds without errors
- Tested on real hardware
- No compiler warnings
- Documentation updated
- Commit messages are clear
Commit Messages
Use clear, descriptive messages: Good:PR Description
Include:- What changed
- Why it changed
- How to test it
- Any breaking changes
Code Review
What We Look For
- Correctness: Does it work as intended?
- Safety: No memory leaks or buffer overflows?
- Style: Follows project conventions?
- Documentation: Is it documented?
Response Time
We try to review PRs within one week. Be patient if it takes longer.Changes Requested
If we ask for changes:- Make the requested changes
- Push to your branch (PR updates automatically)
- Comment when ready for re-review
Hardware Contributions
PCB Design
Want to improve the hardware?- Use KiCad 6.0 or later
- Document changes in commit message
- Include schematic and layout files
- Add gerbers for manufacturing
Testing New Designs
Before submitting:- Build and test the PCB
- Verify all signals work correctly
- Document any issues found
- Include photos of assembled board
Documentation
Improving Docs
Found unclear documentation?- Fork the repo
- Edit the .mdx files
- Preview locally
- Submit PR
Adding Examples
Share your project:- Write clear example code
- Add comments explaining each step
- Include expected output
- Submit as PR to examples/ folder
Community Guidelines
Be Respectful
- Use welcoming language
- Respect different viewpoints
- Focus on constructive feedback
Be Patient
- Maintainers are volunteers
- Reviews take time
- Not all PRs can be merged
Stay on Topic
- Keep discussions relevant
- Use appropriate channels (issues vs discussions)
Feature Requests
What We Accept
Features that:- Fit the project scope
- Don’t break existing functionality
- Are well-tested
- Have clear documentation
What We Usually Decline
Features that:- Are too specific to one use case
- Significantly increase complexity
- Break compatibility
- Lack proper testing
Bug Reports
Good Bug Reports Include
-
Environment
- Hardware version
- Firmware version
- Operating system
-
Steps to Reproduce
- What you did
- What happened
- What you expected
-
Logs
- Serial output
- Error messages
- Stack traces
Questions
Where to Ask
- Issues: For bugs and feature requests
- Discussions: For questions and ideas
- Discord: For real-time chat (if available)
How to Ask
Be specific: Good: “How do I change the ADS1220 sample rate to 330 SPS?” Bad: “It’s not working”License
By contributing, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means:- Your code can be used and modified by anyone
- Modified versions must also be open source
- Network use counts as distribution
Recognition
Contributors are credited in:- Release notes
- README contributors section
- Commit history
Getting Help
Need help contributing?- Comment on the issue you want to work on
- Ask in discussions
- Check existing code for examples