Potentially refactoring ConnectionStatus #51
dilyn-corner
started this conversation in
Design
Replies: 1 comment 1 reply
-
After further discussion with Jim, we instead arrived at the following conclusion:
It seems like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With the merging of #47, I came across a few things that gave me some pause. I think it's worth considering.
I left some initial thoughts here.
What I can surmise from the reference code and documentation is that there are certain return values that don't actually originate from the board itself, but are rather things the code does. The big example is
ConnectionStatus::Idle
(WL_STATUS_IDLE
). It looks like it's just a value that gets periodically returned while the board is doing something. For instance, the value crops up in a lot of loops, e.g.WiFiClass::begin
.It makes me wonder if we should instead consider that consumers of our crate want these sorts of things exposed, for whatever reason they might want to use them - as it stands, I don't think
ConnectionStatus::Idle
is ever returned by the board in this context, and our code doesn't return this. I don't know to what extent things like this exist in the rest of the code, so this might just be a supreme-level nit on a singleenum
, but at the very least it's something worth keeping in mind as we draw closer to 0.3.Beta Was this translation helpful? Give feedback.
All reactions