Skip to content

refactor(ads7138): updated functions to get all values#96

Merged
finger563 merged 1 commit intomainfrom
refactor/ads7138
Jul 20, 2023
Merged

refactor(ads7138): updated functions to get all values#96
finger563 merged 1 commit intomainfrom
refactor/ads7138

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Jul 20, 2023

Description

  • Updated how the functions to get all values are implemented to use the size of analog_inputs_ to set the size of the vector containers for a single allocation instead of using push_back which performs heuristic allocation

Motivation and Context

No sense performing more allocations (and potentially using more space) than needed.

How has this been tested?

Building the ads7138 example

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

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.

* Updated how the functions to get all values are implemented to use the size of analog_inputs_ to set the size of the vector containers for a single allocation instead of using push_back which performs heuristic allocation
@finger563 finger563 merged commit ec336e6 into main Jul 20, 2023
@finger563 finger563 deleted the refactor/ads7138 branch July 20, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant