Closed dukess closed 1 year ago
@dukess FYI: Someone just complained about not being able to compile for ESP32, error message says something about "esp32_time.h" and so on. I don't know if that has something to do with the last PR merged two days ago, but just in case I wanted to let you know.. ;) https://forum.fhem.de/index.php/topic,29762.msg1245538.html#msg1245538
src/Time directory is superfluous for ESP32. esp32_time.h will be replace TimeLib library
But it will only work on ESP32, not on Arduino, right? If so, users would have to delete the library they're not using, which is a bit of a hassle. What was again the benefit of switching from TimeLib to esp32_time?
Compiling for Arduino works fine without having to delete esp32_time.h, but not when compiling for ESP32.
Same story as WiFiSpi: this library can't build for ESP32. Benefit is small but exist: esp32_time is wrapper for POSIX time functions which native used in ESP32. May be RTC will be more accuracy. Main benefit (for me): files that program records will have the correct date and time of the change.
Ok, I don't really understand everything here - so please let me know at the end what I have to adjust/note/change within the manual ;) thx
Compiling for Arduino works fine without having to delete esp32_time.h, but not when compiling for ESP32.
Yep. I added directives
so it never be compiled on Arduino.
please let me know at the end what I have to adjust/note/change within the manual ;) thx
Sure!
But thesel ines here should have the effect that TimeLib also never compiles on ESP32:
#if defined(ESP32)
#include "src/esp32_time.h"
#else
#include "src/Time/TimeLib.h"
#endif
The strange thing with the compilers is that they seem to compile every library in the directory structure, even if the library is nowhere included in the code. Don't know why this is done and how to prevent this, but for the time being, @1coderookie please add TimeLib
to the folders that ESP32 users have to remove before compiling, similar to ArduinoMDNS and WiFiSPI. Thanks!
@1coderookie please add
TimeLib
to the folders that ESP32 users have to remove before compiling, similar to ArduinoMDNS and WiFiSPI. Thanks!
I'll do it asap, thx (..so I guess there'll be coming a few questions/reports about this in the near future, as users tend to not read the manual again after successfully flashing once ;) )
Ah, stop the press ;) - now I understood what @dukess meant with adding the conditional defines, I was looking at the wrong spot. I have modified TimeLib and now it compiles fine here. Will do the same with ArduinoMDNS and WiFiSPI and then it will hopefully no longer be necessary to remove these directories when compiling for ESP32. We just have to remember to add these conditionals into the libraries' source code once we update them to a newer version.
The strange thing with the compilers is that they seem to compile every library in the directory structure, even if the library is nowhere included in the code. Don't know why this is done and how to prevent this, but for the time being,
Sad but as is.
Wait - WHAT? Not necessary anymore in the near future to delete those folders and I don't need to add TimeLib to WiFiSpi etc? Well THATS good news! :partying_face: Ok so let me know when to remove the note about WiFiSpi/ArduinoMDNS then..thx ;)
Ok, I added conditionals to all the Arduino-specific libraries so they won't compile. @1coderookie: You can remove the instructions to remove ArduinoMDNS and WifFiSpi from the manual. It won't hurt if people still delete them (because they have an old manual on their PC), but it won't be necessary anymore with the fix I just added :)...
Sweet! Will do it asap..
Thanks!
Fix for https://github.com/fredlcore/BSB-LAN/issues/515 Adaptive (int/float) program numbers printing for /Q command Fix for wrong month and weekday numbers