Skip to content

Separated HALTarget into a common and a V1 HALs#211

Merged
gabryelreyes merged 6 commits intomainfrom
feature/CommonHAL
Dec 29, 2025
Merged

Separated HALTarget into a common and a V1 HALs#211
gabryelreyes merged 6 commits intomainfrom
feature/CommonHAL

Conversation

@gabryelreyes
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gabryelreyes gabryelreyes marked this pull request as ready for review December 28, 2025 18:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

"name": "Os"
},
{
"name": "HALTargetCommon"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@gabryelreyes gabryelreyes merged commit b0b6618 into main Dec 29, 2025
21 checks passed
@BlueAndi BlueAndi deleted the feature/CommonHAL branch December 29, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants