Separated HALTarget into a common and a V1 HALs#211
Merged
gabryelreyes merged 6 commits intomainfrom Dec 29, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request separates the HALTarget library into two distinct libraries: HALTargetCommon (shared code) and HALTargetV1 (V1-specific implementation). The refactoring creates a cleaner architecture for supporting multiple hardware target versions.
Key Changes:
- Split HALTarget into HALTargetCommon and HALTargetV1 libraries
- Updated platformio.ini to reference both new libraries instead of the single HALTarget
- Moved version-specific components (GPIO, USBHost, ButtonDrv, Button, Board) to HALTargetV1
- Moved shared components (Robot, Network, MqttClient, LEDs, Battery, FileHandler, I/O abstractions) to HALTargetCommon
Reviewed changes
Copilot reviewed 4 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| platformio.ini | Updates library dependencies from HALTarget to HALTargetV1 + HALTargetCommon |
| lib/HALTargetV1/src/USBHost.h | Adds missing <Usb.h> include to V1-specific USB host implementation |
| lib/HALTargetV1/src/USBHost.cpp | New file: Complete USB host driver implementation for V1 hardware |
| lib/HALTargetV1/src/GPIO.h | New file: GPIO pin definitions and abstractions for V1 hardware |
| lib/HALTargetV1/src/GPIO.cpp | New file: GPIO initialization implementation for V1 |
| lib/HALTargetV1/src/ButtonDrv.h | New file: Button driver with debouncing for V1 hardware |
| lib/HALTargetV1/src/ButtonDrv.cpp | New file: Button driver implementation with ISR handling |
| lib/HALTargetV1/src/Button.h | New file: Button interface adapter for V1 |
| lib/HALTargetV1/src/Button.cpp | New file: Button implementation using ButtonDrv |
| lib/HALTargetV1/src/Board.h | New file: V1 board implementation aggregating all hardware components |
| lib/HALTargetV1/src/Board.cpp | New file: Board initialization and processing logic for V1 |
| lib/HALTargetV1/library.json | New V1 library metadata with dependency on HALTargetCommon |
| lib/HALTargetCommon/src/Robot.h | New file: Robot communication abstraction using USBHost |
| lib/HALTargetCommon/src/Robot.cpp | New file: Robot reset and bootloader management |
| lib/HALTargetCommon/src/Network.h | New file: WiFi network management with AP fallback |
| lib/HALTargetCommon/src/Network.cpp | New file: Network state machine implementation |
| lib/HALTargetCommon/src/MqttClient.h | New file: MQTT client abstraction |
| lib/HALTargetCommon/src/MqttClient.cpp | New file: MQTT connection, pub/sub implementation |
| lib/HALTargetCommon/src/Led*.h/cpp | New files: RGB LED control implementations |
| lib/HALTargetCommon/src/Io.hpp | New file: Template-based I/O pin abstractions |
| lib/HALTargetCommon/src/FileHandler.h | New file: File system interface |
| lib/HALTargetCommon/src/FileHandler.cpp | New file: LittleFS-based file operations |
| lib/HALTargetCommon/src/Battery.h | New file: Battery monitoring interface |
| lib/HALTargetCommon/src/Battery.cpp | New file: Voltage measurement and charge calculation |
| lib/HALTargetCommon/library.json | Renames library from HALTarget to HALTargetCommon |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 38 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BlueAndi
requested changes
Dec 29, 2025
lib/HALTargetV1/library.json
Outdated
| "name": "Os" | ||
| }, | ||
| { | ||
| "name": "HALTargetCommon" |
BlueAndi
approved these changes
Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.