esptool-js icon indicating copy to clipboard operation
esptool-js copied to clipboard

Add reset modes

Open brianignacio5 opened this issue 1 year ago • 1 comments

Fix #43

Add Before and after reset modes options

brianignacio5 avatar Jun 17 '24 10:06 brianignacio5

Download the artifacts for this pull request:

github-actions[bot] avatar Jun 17 '24 10:06 github-actions[bot]

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?

makermelissa avatar Jan 09 '25 19:01 makermelissa

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

Could you test it again ?

brianignacio5 avatar Jan 13 '25 10:01 brianignacio5

Of course.

makermelissa avatar Jan 13 '25 20:01 makermelissa

Tested and it is working great.

makermelissa avatar Jan 13 '25 20:01 makermelissa