mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #172] AutoConnectWithFSParameters issue with #include ordering #136
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vrolijkegast on GitHub (May 16, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/172
I was unable to compile the AutoConnectWithFSParameters example
The error message was:
/ .... / Polyfills/isNaN.hpp:29:17: error: 'isnan' was not declared in this scope
return isnan(x);
After investigation, I found out that there was a conflict between <WiFiManager.h> and <ArduinoJson.h>. I looks like WiFiManager does an 'undef' of isnan. Maybe it somehow includes cmath.h ? When I reordered the include statements, it compiles without issues. I stopped investigating after that.
The code now looks like this:
// this needs to be included BEFORE <WiFiManager.h>
include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson
//needed for library
include <DNSServer.h>
include <ESP8266WebServer.h>
include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
Since it took me quite some time, I thought I should share it.
I am using ArduinoIDE 1.6.8. on Ubuntu Linux.
I compile the code for a 'Wemos D1 mini' (based on the ESP8266)
@kentaylor commented on GitHub (May 16, 2016):
That suggests a feather in the cap of @battika for getting the order this way in his version at https://github.com/kentaylor/WiFiManager/blob/master/examples/ConfigOnSwitchFS/ConfigOnSwitchFS.ino
@tzapu commented on GitHub (Jun 2, 2016):
hi, just to let you know that the undefs and everything related to that has been reverted in the latest version
thanks for reporting and using ;)
reopen if still an issue