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

WiFiManagerParameter init() to protected from private #741

Merged
merged 2 commits into from
Sep 26, 2018

Conversation

dontsovcmc
Copy link
Contributor

Little feature to make possible children classes for easy custom parameters.
Example: https://github.com/dontsovcmc/waterius/blob/master/ESP8266/src/setup_ap.h

@tablatronix
Copy link
Collaborator

Hmm should we add an example or use case?

@dontsovcmc
Copy link
Contributor Author

No, no. I show you my code as a reason of this changes.
I can make pull request with example if needed.

@tablatronix
Copy link
Collaborator

Yeah if we can put something in the docs It might be useful.

@dontsovcmc
Copy link
Contributor Author

@dontsovcmc
Copy link
Contributor Author

debug log:

--- Miniterm on /dev/tty.SLAB_USBtoUART  9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

* * * FIRST START * * *

␒�␀␄�=S��Press setup button
3..2..1..Settings loaded //you can see random EEPROM first time
WORK
String param: 789012345678901234567890 
Float param: 0.00
Int param: 909456435
IP param: 55.56.57.48

* * * RESET * * *

␒`�␄�␝���Press setup button
3..2..1..Settings loaded
SETUP
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: str
*WM: [2] Added Parameter: float
*WM: [2] Added Parameter: int
*WM: [2] Added Parameter: ip
*WM: [3] WIFI station disconnect 
*WM: [3] WiFi station enable 
*WM: [2] Disabling STA 
*WM: [2] Enabling AP 
*WM: [1] StartAP with SSID:  ESP_2966e8
*WM: [2] AP has anonymous access! 
*WM: [1] AP IP address: 192.168.4.1
*WM: [3] setupConfigPortal 
*WM: [1] Starting Web Portal 
*WM: [3] dns server started with ip:  192.168.4.1
*WM: [2] HTTP server started 
*WM: [2] WiFi Scan ASYNC started 
*WM: [2] Config Portal Running, blocking, waiting for clients... 
*WM: [2] WiFi Scan ASYNC completed in 2234 ms
*WM: [2] WiFi Scan ASYNC found: 7
*WM: [2] NUM CLIENTS: 0 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> clients3.google.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> clients3.google.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> c.whatsapp.net 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> mini5.opera-mini.net 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [2] <- HTTP Root 
*WM: [3] -> 192.168.4.1 
*WM: [3] lastconxresult: WL_IDLE_STATUS
*WM: [2] WiFi Scan ASYNC started 
*WM: [3] -> 192.168.4.1 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [2] <- HTTP Wifi 
*WM: [2] Scan is cached 50651 ms ago
*WM: [1] 7 networks found
*WM: [2] DUP AP: 
*WM: [2] DUP AP: 
*WM: [2] DUP AP: 
*WM: [2] DUP AP: 
*WM: [2] DUP AP: 
*WM: [2] DUP AP: 
*WM: [2] AP:  0 
*WM: [2] WiFi Scan ASYNC completed in 2347 ms
*WM: [2] WiFi Scan ASYNC found: 9
*WM: [3] lastconxresult: WL_IDLE_STATUS
*WM: [3] Sent config page 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [2] NUM CLIENTS: 1 
*WM: [3] -> connectivitycheck.gstatic.com 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> c.whatsapp.net 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> c.whatsapp.net 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> mini5.opera-mini.net 
*WM: [2] <- Request redirected to captive portal 
*WM: [3] -> c.whatsapp.net 
*WM: [2] <- Request redirected to captive portal 
*WM: [2] NUM CLIENTS: 1 
*WM: [2] <- HTTP WiFi save  
*WM: [3] Method: POST
*WM: [2] Parameters 
*WM: [2] -------------------- 
*WM: [2] str: hello
*WM: [2] float: 0.20
*WM: [2] int: 3
*WM: [2] ip: 1.1.1.1
*WM: [2] -------------------- 
*WM: [3] static ip: 1.1.1.1
*WM: [3] Sent wifi save page 
*WM: [2] process connect 
*WM: [2] Connecting as wifi client... 
*WM: [2] Custom STA IP/GW/Subnet 
*WM: [0] [ERROR] wifi config failed 
*WM: [3] WIFI station disconnect 
*WM: [1] Connecting to new AP: don
*WM: [3] WiFi station enable 
*WM: [3] enableSTA PERSISTENT ON 
*WM: [1] connectTimeout not set, ESP waitForConnectResult... 
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] Connect to new AP [SUCCESS] 
*WM: [1] Got IP Address: 
*WM: [1] 192.168.1.51 
*WM: [2] disconnect configportal 
*WM: [2] restoring usermode STA+AP
*WM: [2] wifi status: WL_CONNECTED
*WM: [2] wifi mode: STA+AP
*WM: [1] config portal exiting 
String param: hello
Float param: 0.20
Int param: 3
IP param: 1.1.1.1
Settings saved
*WM: [3] freeing allocated params! 
*WM: [3] unloading 

* * * RESET * * *

␒�␄��8���Press setup button
3..2..1..Settings loaded
WORK
String param: hello
Float param: 0.20
Int param: 3
IP param: 1.1.1.1

@tablatronix tablatronix added the enhancement Feature Request label Sep 24, 2018
@tablatronix
Copy link
Collaborator

I think this is good, could probably even use custom html for input type classes, like checkboxes, selects.

@dontsovcmc
Copy link
Contributor Author

wow. i never try =). yes, you are right.

@tablatronix tablatronix merged commit 37e1006 into tzapu:development Sep 26, 2018
@tablatronix tablatronix mentioned this pull request Oct 5, 2018
2 tasks
@dontsovcmc dontsovcmc deleted the waterius_development branch October 18, 2018 21:49
@dontsovcmc
Copy link
Contributor Author

@tablatronix
Copy link
Collaborator

Example of what?

@tablatronix
Copy link
Collaborator

Ohh you just linked it, gotcha

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

Successfully merging this pull request may close these issues.

2 participants