Skip to content
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

reason2str wrong? #1128

Closed
tablatronix opened this issue Feb 20, 2018 · 1 comment
Closed

reason2str wrong? #1128

tablatronix opened this issue Feb 20, 2018 · 1 comment

Comments

@tablatronix
Copy link
Contributor

tablatronix commented Feb 20, 2018

Why do the upper reason codes not align with the bottom.

[W][WiFiGeneric.cpp:298] _eventCallback(): Reason: 202 - ASSOC_FAIL

WIFI_REASON_BEACON_TIMEOUT              = 200,
WIFI_REASON_NO_AP_FOUND                     = 201,
WIFI_REASON_AUTH_FAIL                            = 202,
WIFI_REASON_ASSOC_FAIL                          = 203,
WIFI_REASON_HANDSHAKE_TIMEOUT       = 204,

EDIT: ohhhh
Ok so maybe its just
reason2str that is wrong..

Should this maybe be 0 indexed instead, so (r-176)-1
#define reason2str(r) ((r>176)?system_event_reasons[r-177]:system_event_reasons[r-1])

@tablatronix tablatronix changed the title wifi_err_reason_t make no sense, or is wrong reason2str wrong? Feb 20, 2018
@copercini
Copy link
Contributor

Closed due it's fixed here: #1132

Nice PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants