Skip to content

Conversation

@brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Jun 17, 2024

Fix #43
Fix #177
Fix #178

Add Before and after reset modes options

@brianignacio5 brianignacio5 added the enhancement New feature or request label Jun 17, 2024
@brianignacio5 brianignacio5 self-assigned this Jun 17, 2024
@github-actions
Copy link

github-actions bot commented Jun 17, 2024

Download the artifacts for this pull request:

@brianignacio5 brianignacio5 mentioned this pull request Jan 9, 2025
6 tasks
@makermelissa
Copy link
Contributor

Ok, tested and it's still resetting. I believe this is because you are now calling reset in 2 locations (probably due to the rebasing).

  1. The existing function constructResetSequency() (misspelling?) is still being called which creates an array of resets. This is then called inside of _connectAttempt.
  2. Your function constructResetSequence() is being called as well, but it does take mode into account.

It seems like it would be best to combine the 2 functions and return an array of reset sequences. Perhaps if mode is "no_reset", then possibly return an empty array and leave the call inside of _connectAttempt like it is now. To deal with the empty array maybe have some kind of empty reset sequence or just avoid calling the reset function altogether.

Either way, I think a combination of the 2 methods would work best. Would you like me to make a PR for this PR or you just handle it?

@brianignacio5
Copy link
Collaborator Author

Thank you for the fix @makermelissa I've pushed the changed from #181 here.

Could you test it again ?

@makermelissa
Copy link
Contributor

Of course.

@makermelissa
Copy link
Contributor

Tested and it is working great.

@brianignacio5 brianignacio5 merged commit eabaa29 into main Jan 14, 2025
1 check passed
@brianignacio5 brianignacio5 deleted the feature/reset-modes branch January 14, 2025 05:41
brianignacio5 added a commit that referenced this pull request Jan 14, 2025
* add before after reset modes

* Combine reset sequence constructor functions (#181)

* update pages node version rm duplicate debug msg

* add after hard reset in live demo

---------

Co-authored-by: Melissa LeBlanc-Williams <[email protected]>

npm audit

test pages

use ubuntu 20

update pages yml

add parcel workers 0

parcel build workers

rm debug action

update action version
}

if (options.resetConstructors?.classicReset) {
this.resetConstructors.classicReset = options.resetConstructors?.classicReset;
Copy link
Contributor

@balloob balloob Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you already checked the variable exists, so you don't need to add ? after resetConstructors

this.resetConstructors.classicReset = options.resetConstructors.classicReset;

Also, you can just use

    this.resetConstructors = {
      classicReset: (transport, resetDelay) => new ClassicReset(transport, resetDelay),
      customReset: (transport, sequenceString) => new CustomReset(transport, sequenceString),
      hardReset: (transport, usingUsbOtg) => new HardReset(transport, usingUsbOtg),
      usbJTAGSerialReset: (transport) => new UsbJtagSerialReset(transport),
      ...(options.resetConstructors || {})
    };

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no_reset support for Airlift ESP32 co-processors ESP32-s3 reset exception after burning program Implement reset modes

3 participants