Skip to content
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

feat(base_component): add new base component and improve I2C class + example #149

Merged
merged 16 commits into from
Feb 12, 2024

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Feb 11, 2024

Description

  • Add base component which contains logger with some methods for setting logging level and tag for the logger
  • Update i2c to subclass base component and add some extra methods for writing / reading with std::vector. Also added some logging to the i2c component
  • Add i2c format helpers for logging the i2c bus which is initialized
  • Add missing i2c destructor
  • Update i2c example to test new i2c destructor
  • Add i2c menu to i2c example for allowing interactive control / query of the i2c bus using cli component
  • Update i2c and cli component to have s3 defualts file configuring the console output port to be usb serial/jtag
  • Update components (non-peripherals) to subclass espp::BaseComponent
    • adc
    • bldc_driver
    • bldc_haptics
    • bldc_motor
    • button
    • controller
    • display
    • encoder
    • event_manager
    • file_system
    • ftp
    • i2c
    • input_drivers
    • joystick
    • led
    • led_strip
    • monitor
    • pid
    • rmt
    • rtsp
    • socket
    • task
    • thermistor
    • timer
    • wifi

Motivation and Context

A base component reduces boilerplate by adding logger and some log related functions to the base class.

How has this been tested?

  • Building and running the new i2c example.
  • Building and running the task example
  • Building and running the adc example
  • Building all the examples using CI (in this PR)

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

CleanShot 2024-02-11 at 11 19 02@2x

CleanShot 2024-02-11 at 11 42 09@2x

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.

* Add base component which contains logger with some methods for setting logging level and tag for the logger
* Update i2c to subclass base component and add some extra methods for writing / reading with std::vector. Also added some logging to the i2c component
* Add i2c format helpers for logging the i2c bus which is initialized
* Add missing i2c destructor
* Update i2c example to test new i2c destructor
* Add i2c menu to i2c example for allowing interactive control / query of the i2c bus using cli component
* Update i2c and cli component to have s3 defualts file configuring the console output port to be usb serial/jtag
@finger563 finger563 self-assigned this Feb 11, 2024
Copy link

github-actions bot commented Feb 11, 2024

✅Static analysis result - no issues found! ✅

@finger563 finger563 changed the title feat(base_component): add new base component feat(base_component): add new base component and improve I2C class + example Feb 12, 2024
@finger563 finger563 merged commit ae9724d into main Feb 12, 2024
4 checks passed
@finger563 finger563 deleted the feature/base-component branch February 12, 2024 00:33
@finger563 finger563 mentioned this pull request Feb 12, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant