-
Notifications
You must be signed in to change notification settings - Fork 0
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
More robust handling of responses from NINA-FW #72
Conversation
…f associated types. Also begins to make wait_response_cmd() a bit more robust
…eed the type's max size.
…eed the type's max siz (for new())e.
pub(crate) trait NinaConcreteParam { | ||
pub(crate) trait NinaConcreteParam | ||
where | ||
Self: core::marker::Sized, |
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.
Why was this necessary?
For my own education.
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.
Otherwise Self
won't have a known size and you get this error:
error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> esp32-wroom-rp/src/protocol.rs:58:27
|
58 | fn new(data: &str) -> Result<Self, Error>;
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
note: required by a bound in `Result`
--> /Users/jhodapp/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:504:17
|
504 | pub enum Result<T, E> {
| ^ required by this bound in `Result`
help: consider further restricting `Self`
|
58 | fn new(data: &str) -> Result<Self, Error> where Self: Sized;
| +++++++++++++++++
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.
Looks good!
Description
This PR aims to create a more robust handling of replies & responses back from the NINA-FW on the ESP32 such that we're ready to implement a full handling of a response for issuing a
ProtocolInterface::send_data()
, after an HTTP GET, for example.GitHub Issue: Related to #61
Changes
spin_loop()
inwait_for_esp_ready()
andwait_for_esp_ack()
ControlByte::Error
from NINA-FWNinaProtocolHandler::receive()
out into logical child functions to improve readability and maintainabilityTesting Strategy
cross/
on a target devicecargo test
and ensure all tests passConcerns
None