-
Notifications
You must be signed in to change notification settings - Fork 106
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
Address 3 issues: baud rate change, flash reading, instantiation with port #112
Conversation
fixed baud rate change
@igrr this change looks good. It might fix an issue we’re seeing with ESP Web Tools. Can we get this merged and released? |
interesting failures... |
did update the code, but didn't run it yet in our project (https://github.com/toniebox-reverse-engineering/teddycloud) |
Thanks for the PR @g3gg0 looks great ! I've tested locally with esp32 wrover kit and works good. You can test the lint locally with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor changes
if (onPacketReceived) { | ||
onPacketReceived(packet, resp.length, size); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or handle packet not received
try { | ||
await this.sync(); | ||
break; | ||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use this.debug(msg)
which will only log when debugLogging is enabled.
Closing this PR since it is merged with fixes in 04e337d |
Thanks. Don't forget to tag the release on GitHub too. |
I found a small bug in the type which I reported here 04e337d#r130045791 |
This PR adds 3 changes that made the code usable in TeddyCloud, a toniebox server implementation.
Reading flash memory
the function read_flash() allows reading back the flash
Baud rate fix
changing the baud rate did not resynchronize properly. added sync and retries.
this way 921600 baud connection works always. before it worked 1 out of 30 connection attempts.
Instantiation using WebSerial port as well as Transport
simplify caller's code by directly using WebSerial port object if specified.