-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/stepper overlay update #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…for stepper and UART handling
There was a problem hiding this 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 PR introduces a comprehensive refactoring of the stepper motor overlay configuration and thread management infrastructure. The main purpose is to modernize the device configuration approach by migrating from Zephyr aliases to chosen nodes, introduce a base Thread class to reduce code duplication, and improve the stepper driver API usage. The changes also establish proper test infrastructure with fake stepper drivers, separating test concerns from the main application.
Key Changes
- Migrated device configuration from devicetree aliases and
zephyr,userproperties to chosen nodes (focuser,uart,focuser,stepper,focuser,stepper-drv) - Introduced a base
Threadclass to eliminate duplication in thread creation logic betweenFocuserThreadandUartThread - Created dedicated test infrastructure using Zephyr's fake stepper drivers, removing qemu_cortex_m0 support from the main application
- Updated stepper driver API calls from
stepper_enable/stepper_disabletostepper_drv_enable/stepper_drv_disable
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/app/focuser/testcase.yaml | Adds test configuration targeting qemu_cortex_m0 with focuser tag |
| tests/app/focuser/src/main.cpp | Implements comprehensive test suite for Focuser initialization, speed control, and stop functionality using fake stepper drivers |
| tests/app/focuser/prj.conf | Configures test environment with ztest, C++20, and fake stepper driver support |
| tests/app/focuser/boards/qemu_cortex_m0.overlay | Defines devicetree overlay with fake stepper controller and driver for testing |
| tests/app/focuser/boards/qemu_cortex_m0.conf | Test-specific board configuration (with outdated comment about H-bridge driver) |
| tests/app/focuser/CMakeLists.txt | Test build configuration linking to application sources |
| app/src/main.cpp | Refactors to use new configuration namespace structure and removes console device check |
| app/src/ZephyrStepper.cpp | Updates to use new stepper driver API (stepper_drv_enable/disable) |
| app/src/UartThread.hpp | Converts to inherit from Thread base class |
| app/src/UartThread.cpp | Refactors to use Thread base class constructor and start_thread() method |
| app/src/Thread.hpp | Introduces new base class for thread management with protected start_thread() method |
| app/src/Thread.cpp | Implements base thread creation logic with validation and naming support |
| app/src/FocuserThread.hpp | Converts to inherit from Thread base class |
| app/src/FocuserThread.cpp | Refactors to use Thread base class constructor and start_thread() method |
| app/src/Configuration.hpp | Major refactor: uses chosen nodes instead of aliases, consolidates thread configuration into nested namespaces |
| app/sample.yaml | Removes qemu_cortex_m0 from integration platforms (now only in tests) |
| app/prj.conf | Reorganizes configuration comments and adds CONFIG_COUNTER support |
| app/boards/qemu_cortex_m0.overlay | Removes qemu_cortex_m0 overlay from app (moved to test infrastructure) |
| app/boards/esp32s3_devkitc_procpu.overlay | Updates to use chosen nodes and separates stepper controller from driver, with incomplete comment documentation |
| app/CMakeLists.txt | Adds Thread.cpp to build sources |
| .github/workflows/docs.yml | Expands workflow trigger syntax from compact to explicit format |
Comments suppressed due to low confidence (1)
tests/app/focuser/boards/qemu_cortex_m0.conf:5
- The comment is outdated. It mentions "swap in Zephyr's GPIO H-bridge stepper driver", but the test now uses the fake stepper driver (
zephyr,fake-stepper-controllerandzephyr,fake-stepper-driver) as configured in the overlay file, not the H-bridge driver. The comment should be updated to reflect the use of the fake stepper driver for testing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e unused thread stack size configurations
ab7ac9a to
7e43c41
Compare
7e43c41 to
df6dd78
Compare
…t OS matrix to Windows
df6dd78 to
6efce72
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.