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(logger): Add support for cursor commands and expose Logger::get_time() as public #317

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Aug 27, 2024

Description

  • Move get_time() to be public so others can use it.
  • Add some cursor commands for sending ANSI terminal escape sequences

Motivation and Context

Allows for more complex logging behavior to be developed as well as some simple terminal applications.

Support for the cursor commands (which are static functions) can be compiled in either by setting ESPP_LOGGER_CURSOR_COMMANDS_ENABLED=1 as a compile definition, or by using menuconfig. For ESP-based systems which use menuconfig, the cursor commands are enabled by default.

How has this been tested?

Building and running the logger/example on a QtPy ESP32s3.

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

CleanShot 2024-08-27 at 10 53 18

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.

@finger563 finger563 self-assigned this Aug 27, 2024
@finger563 finger563 added enhancement New feature or request logger labels Aug 27, 2024
Copy link

github-actions bot commented Aug 27, 2024

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit 3064211 into main Aug 27, 2024
68 checks passed
@finger563 finger563 deleted the feature/logger-cursor-commands branch August 27, 2024 16:18
SquaredPotato pushed a commit to smartknob-ha/espp that referenced this pull request Jan 27, 2025
…_time()` as public (esp-cpp#317)

* feat(logger): Add support for cursor commands and expose logger::get_time() as public

* fix sa and use remaining in print instead of elapsed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logger
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant