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

Unresolved includes #16

Open
gb0101010101 opened this issue Mar 20, 2019 · 4 comments
Open

Unresolved includes #16

gb0101010101 opened this issue Mar 20, 2019 · 4 comments

Comments

@gb0101010101
Copy link

There are a number of includes that fail to resolve when building on linux.

I have installed ESP8266 boards from http://arduino.esp8266.com/stable/package_esp8266com_index.json but could only find "Adafruit Feather HUZZAH ESP8266" and not "Adafruit HUZZAH ESP8266" as stated in BUILD.MD. Is this the correct board?

Directions from Adafruit say to use this board: https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide

'#include "Wire.h"' used in multiple libraries point to local file that does not exist. Is this supposed to be '#include <Wire.h>' which would use the file from the ESP8266 library?

'#include "Crc16.h"' in SDL_ESP8266_WeatherPlus.ino. Local file is lowercase 'crc16.h' and therefore fails to include on Case Sensitive Linux OS. Renaming file solves the problem. Same goes for '#include "elapsedMillis.h"' in same INO file.

Conversely there is '#include <String.h>' which should be lowercase '#include <string.h>'

Then it gets a bit more complex. There is '#include <Time.h>' in SDL_Weather_80422.cpp. Is this supposed to use the local file 'TimeLib.h' or '#include <time.h>' or 'Time' library by Michael Margolis?

Finally there is '#include "user_interface.h"' in local WifiManager.h. "user_interface.h" is not in your repo.

I see that others have brought up similar issues but they were not fixed in repo:
#2
#4
#14

Thanks for any info you provide. Should be receiving my kit in 2 days and would like to get the code compiling before then.

@switchdoclabs
Copy link
Owner

switchdoclabs commented Mar 20, 2019 via email

@gb0101010101
Copy link
Author

Hi John,

Thanks for the prompt reply. I managed to get it to compile with the following changes:

#include "Wire.h" -> #include <Wire.h>
#include "Crc16.h" -> Renamed file from repo to match
#include "elapsedMillis.h" -> Renamed file from repo to match
#include <String.h> -> #include <string.h>
#include <Time.h> -> #include <time.h>

#include "user_interface.h" problem disappeared without me changing anything. No I dea why it happened.

Also had to modify 2 occurrences of Wire.requestFrom() in WXLink.h
Wire.requestFrom(0x08, 32, true); -> Wire.requestFrom(8, 32, 1);
This is using ESP8266 Wire v2.4.2 library. I think the 2nd value was wrong type but chnaged all to 'int' to match candidate for an easier change.

Will post other issues on the Switchdoc Forum of which hopefully there will be none. Just wanted to respond here so that others would know what needed to be changed.

@ConorIA
Copy link

ConorIA commented Apr 8, 2020

Thank you @gb0101010101 for this guide. I followed your indications in #16 (comment) and managed to compile. The changes should be made in the repo. I may do my part and open a PR later in the week. Also, I found that WifiManager.h needs to be updated for newer versions of the https://github.com/esp8266/Arduino. (I was running into this bug) Instead of taking on that challenge, I just installed version 2.5.0 (I tried to guess what version may have been used to compile here) and that worked.

EDIT: I see @gb0101010101 has already made substantial changes on their fork. Amazing. Some of the improvements could be cherry-picked back here. I have a question about one of the commits, but issues on the fork are disabled and no email is on the profile. @gb0101010101, please send me an email at [email protected] if you don't mind me asking about the AM2315 driver.

@MrDornback
Copy link

A word of advice, which bit me in my backside when I wasn't paying attention.
If you change includes from local "" to global <>, you may be missing some custom functions/handlers that are specific to the SDL software and .h .cpp files.

I found this when dealing with an HTTP_HEAD re-declaration issue...
#23

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

4 participants