Skip to content

feat(drv2605): Add support for calibration and other modes / controls #456

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

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Jun 12, 2025

Description

  • Flesh out implementation of DRV2605 to support:
    • calibration
    • standby control
    • reset
    • real-time playback (RTP) with amplitude setting via I2C
  • Disables open-loop ERM by default
  • Update example to test calibration and clean it up some

Motivation and Context

Fleshes out the DRV2605 to better support motor calibration and other use cases.

How has this been tested?

Build and run drv2605/example on esp-box-emu project for testing. Ensure calibration works and waveforms still play afterwards.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2025-06-12 at 11 16 22

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 self-assigned this Jun 12, 2025
@finger563 finger563 requested a review from Copilot June 12, 2025 16:25
@finger563 finger563 added enhancement New feature or request haptics drv2605 labels Jun 12, 2025
Copy link
Contributor

@Copilot 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 PR adds expanded functionality for the DRV2605 driver, including support for LRA calibration, standby control, reset, and RTP mode with amplitude control. Key changes include:

  • Integrating a new calibration flow with configurable LRA calibration settings.
  • Streamlining the example code with updated logging and driver instantiation using an alias.
  • Updating the README with refreshed images and an enhanced table of contents.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
components/drv2605/example/main/drv2605_example.cpp Updated driver configuration and calibration flow along with revised logging messages.
components/drv2605/example/README.md Updated example documentation with new screenshots and an enhanced table of contents.
Comments suppressed due to low confidence (2)

components/drv2605/example/main/drv2605_example.cpp:87

  • [nitpick] The revised log message now only outputs the waveform value. Consider restoring or clarifying the removal of the elapsed time logging to ensure the log output remains informative for debugging.
logger.info("{}", waveform);

components/drv2605/example/README.md:49

  • [nitpick] The 'older:' label in the image section might confuse readers. Consider clarifying or removing this label to maintain a clear and up-to-date presentation of the example output.
older:

@finger563 finger563 merged commit ea272e6 into main Jun 12, 2025
80 checks passed
@finger563 finger563 deleted the feat/drv2605-enhancement branch June 12, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drv2605 enhancement New feature or request haptics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant