Skip to content

fix(ws-s3-touch): rename method to just be button instead of boot_button since it is the only programmable button. add it to example #480

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 1 commit into from
Jul 14, 2025

Conversation

finger563
Copy link
Contributor

No description provided.

…button` since it is the only programmable button. add it to example
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 requested a review from Copilot July 14, 2025 14:05
@finger563 finger563 self-assigned this Jul 14, 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 renames the boot-specific button methods to more generic names and adds an example of using the new initialize_button API.

  • Rename initialize_boot_button and boot_button_state to initialize_button and button_state
  • Update header signatures and comments accordingly
  • Add a usage example in ws_s3_touch_example.cpp to demonstrate button initialization and handling

Reviewed Changes

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

File Description
components/ws-s3-touch/src/buttons.cpp Renamed method implementations from boot-specific to generic button
components/ws-s3-touch/include/ws-s3-touch.hpp Updated method signatures and comments in the public interface
components/ws-s3-touch/example/main/ws_s3_touch_example.cpp Added example code showing how to initialize and handle the button
Comments suppressed due to low confidence (4)

components/ws-s3-touch/src/buttons.cpp:10

  • [nitpick] The log message still references 'boot button'; consider updating it to 'button' to match the renamed method.
  logger_.info("Initializing boot button");

components/ws-s3-touch/include/ws-s3-touch.hpp:221

  • Update the comment to refer to 'button' instead of 'boot button' for consistency with the renamed method.
  /// Initialize the boot button (middle button)

components/ws-s3-touch/include/ws-s3-touch.hpp:226

  • Update the comment to refer to 'button state' instead of 'boot button state' to align with the new method name.
  /// Get the boot button state

components/ws-s3-touch/src/buttons.cpp:24

  • [nitpick] The member variable boot_button_initialized_ is inconsistent with the renamed method; consider renaming it to button_initialized_ for clarity.
  if (!boot_button_initialized_) {

@finger563 finger563 merged commit f00b7c1 into main Jul 14, 2025
88 checks passed
@finger563 finger563 deleted the fix/ws-s3-touch-button branch July 14, 2025 14:09
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