Commit graph

3 commits

Author SHA1 Message Date
martin
a2e404ec0f Refactor to unified firmware architecture with modular configuration system
BREAKING CHANGE: Replace separate anchor/tag firmware with single configurable codebase

## Major Changes
- **Unified Firmware**: Single main.cpp replaces main_anchor.cpp and main_tag.cpp
- **Modular Config**: Organized configuration system in src/config/ directory
- **Dynamic Behavior**: Device behavior determined by build flags at compile time
- **Simplified Builds**: Reduced from 8+ environments to 3 core environments

## New Architecture
- src/main.cpp - Single firmware with config-driven behavior
- src/config/device_config.h - Device role detection and unified behavior
- src/config/anchor_config.h - Anchor-specific settings (positioning, communication)
- src/config/tag_config.h - Tag-specific settings (USB streaming, coordinate collection)
- src/config/positioning_config.h - Distributed positioning algorithm framework

## Build System Improvements
- Simplified platformio.ini (anchor/tag/debug environments)
- Support for custom device ID and network via PLATFORMIO_BUILD_FLAGS
- Same firmware for all devices, behavior configured at compile time
- Easy device configuration: set PLATFORMIO_BUILD_FLAGS=-DUWB_INDEX=5 -DNETWORK_ID=2000

## Technical Benefits
- Reduced code duplication from ~350 lines to unified ~200 lines
- Consistent behavior across device types
- Easier maintenance with single codebase
- Framework ready for distributed positioning algorithm implementation
- Modular configuration system for future algorithm expansion

## Positioning Framework Ready
- Anchor discovery protocol framework established
- Inter-anchor communication configuration ready
- Position calculation algorithm structure in place
- Coordinate storage and validation system configured
- Tag coordinate collection and USB streaming framework prepared

## Testing
-  Anchor build successful (325KB flash usage)
-  Tag build successful (325KB flash usage)
-  Custom device ID/network configuration working
-  UWB initialization sequence fixed for active networks
2025-08-21 21:24:38 +02:00
martin
e7c8fad272 Reorganize project structure and create development roadmap
- Move documentation to organized docs/ directory structure
- Add dev notes
- Create comprehensive 5-phase roadmap for indoor positioning system
- Move AT command manual and hardware images to docs/
- Update README with hardware links and project overview
- Remove sleep mode and OTA functionality for simplification
- Clean up project structure for production development
2025-08-20 14:19:41 +02:00
martin
a89215b7ff Initial commit: ESP32-S3 UWB positioning system
- Added anchor and tag implementations for MaUWB modules
- Configured for 6.8Mbps communication with range filtering
- Support for multiple tags (tag/tag2 environments)
- OLED display integration for real-time measurements
- Simplified code without sleep mode and OTA functionality
- Complete UWBHelper library for AT command interface
2025-08-19 18:50:38 +02:00