Skip to content

Conversation

brianignacio5
Copy link
Collaborator

Description

This pull request adds support for a new "custom_reset" mode to the ESPLoader's reset functionality. It introduces a new reset mode type, updates the after method to accept a custom sequence string, and implements logic to handle custom reset sequences.

Custom reset mode support:

  • Added "custom_reset" to the After type definition in src/types/resetModes.ts, allowing it to be used as a valid reset mode.
  • Updated the after method in ESPLoader (src/esploader.ts) to accept an optional sequenceString parameter for specifying the custom reset sequence.
  • Implemented logic in the after method to handle "custom_reset": it checks for the presence of a sequence string and a custom reset constructor, logs appropriate messages, and executes the custom reset if both are provided.

Fixes #210


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@brianignacio5 brianignacio5 self-assigned this Oct 14, 2025
Copy link

Download the artifacts for this pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow custom reset in after() calls

1 participant