Skip to content

feat(motorgo-mini): API update - allow motor configuration and only pay for what you use#407

Merged
finger563 merged 7 commits intomainfrom
feat/motorgo-mini-update
Mar 14, 2025
Merged

feat(motorgo-mini): API update - allow motor configuration and only pay for what you use#407
finger563 merged 7 commits intomainfrom
feat/motorgo-mini-update

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Mar 14, 2025

Description

  • Update the MotorGoMini to use shared_ptr for encoders, drivers, and motors. Only allocate them if the relevant functions are called, so that if the user does not want to use them they don't have to waste memory on them.
  • Update MotorGoMini to allow the user to pass in motor configuration structs to support a wider variety of use-cases with different and possibly asymmetric motors. This also allows custom PID configurations to be provided.

Motivation and Context

Allows more modular and varied use of the MotorGoMini class for the motorgo mini hardware.

How has this been tested?

  • Building and running motorgo-mini/example on motorgo mini hardware with two motors.
  • Building and running within the finger563/esp-motorgo-mini-gesture-control project

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

CleanShot 2025-03-13 at 10 36 17

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.

…on with user-provided parameters

* Update motorgo-mini to allow users to specify their own driver voltages as well as their own motor configurations

This allows for a wider variety of use-cases with the motorgo-mini beyond the simple test stand with two bldc drone motors its been designed for up to now.

Build and run `motorgo-mini/example` on a motorgo-mini test stand with two little bldc motors to make sure they still work
@finger563 finger563 self-assigned this Mar 14, 2025
@finger563 finger563 added enhancement New feature or request bldc Related to Brushless DC Motors motorgo mini labels Mar 14, 2025
@github-actions
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit c254d02 into main Mar 14, 2025
75 checks passed
@finger563 finger563 deleted the feat/motorgo-mini-update branch March 14, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bldc Related to Brushless DC Motors enhancement New feature or request motorgo mini

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant