Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

time.h Compile errors with WD v2.0
#11

Yes, Werk_AG,

Now I'm sure, you are right (again Wink
After 2 hours of tests with IDE 1.8.0 I'm sure that "this way is not the way" ... Sad

Regards
Zdenek

Best Regards
Zdenek

Brandys/L Weather
Reply
#12

Hi Zdeneck,

I will need time to fully understand what have changed with Arduino IDE 1.8.0. and it seems that a lot of things have changed.
Until then it's better continue to use the IDE 1.7.11 with the suplied libraries.

Reply
#13

(09-01-2017, 01:08)Werk_AG Wrote:  Hi Zdeneck,

I will need time to fully understand what have changed with Arduino IDE 1.8.0. and it seems that a lot of things have changed.
Until then it's better continue to use the IDE 1.7.11 with the suplied libraries.

OK,

Now I will remember it!   Angry  Smile

Regards and good night.
Zd

Best Regards
Zdenek

Brandys/L Weather
Reply
#14

(09-01-2017, 00:11)Werk_AG Wrote:  I strongly suggest you to delete all installations of your Arduino IDE, and install just Arduino IDE 1.7.11.

Will do. Smile  The changelog for 1.8.0 isn't very informative.

Thanks again.
Reply
#15

(08-01-2017, 17:45)roddyp Wrote:  BUT the "time" library in the RAR is out of date (2014), and won't work with Arduino 1.6.6 or later, so you need to get the 1.5 version here: https://github.com/PaulStoffregen/Time/releases

Hi again roddyp

Just a side note:
If you do a file compare (using ExamDiff) between the "time" library supplied on the WeatherDuino Pro2 package and the "newer", you will see that there isn't any changes on the code. In the "newer", just  the time_t type assignment to some Constants was removed.

Also, the new time.h calls timeLib.h, so we can still use on the code the statement #include <time.h>

But as said before, there is no need to upgrade the library, the included time library, is working perfectly.
The problem is the arduino IDE 1.8.0

Thank you for your patience, investigation and help pointing the problem with the new IDE 1.8.0.

Regards

Reply
#16

(09-01-2017, 02:12)Werk_AG Wrote:  If you do a file compare (using ExamDiff) between the "time" library supplied on the WeatherDuino Pro2 package and the "newer", you will see that there isn't any changes on the code. In the "newer", just  the time_t type assignment to some Constants was removed.

Agreed. apart from the time.h now including timelib.h they're essentially unchanged

(09-01-2017, 02:12)Werk_AG Wrote:  ...so we can still use on the code the statement #include <time.h>

Yes - Unless you're using 1.8.0!

1.8.0 has an extended set of system include files compared to 1.7.11, including one called "time.h" - see screenshots

[Image: xbzKDz.th.png]
[Image: cSFD7O.th.png]

Because of this - (and the order in which the  C pre-processor searches for include files) using #include "Time.h" requests (on windows anyway) "time.h" from the system directory rather than "Time.h" from the "Time" library.  

If you use "TimeLib.h", the correct file gets included. That seems to be why the library filenames were changed. Hope that helps.

For now, 1.7.11 is fine to use, but I guess 1.8.0 compatibility will be required soon...
Reply
#17

Some libraries could have been customized for the WeatherDuino Pro2.

Then it is not a bad idea to give those lib's a different name to prevent loading in other projects, or load wrong lib stored somewhereelse!

Regards, Zappie
Reply
#18

(09-01-2017, 12:03)roddyp Wrote:  If you use "TimeLib.h", the correct file gets included. That seems to be why the library filenames were changed. Hope that helps.

I think you are absolutely right!
I did some quick tests with the WD software using the updated library, and using #include <TimeLib.h> instead of #include <Time.h> and it seems to be working. Next I will try the same thing with all the WeatherDuino software that uses the Time library, and will test it during some time. If everything runs stable all software packages will be updated.

One more time, thank you for your efforts and research on this matter, it is helping a lot.

(09-01-2017, 12:03)roddyp Wrote:  For now, 1.7.11 is fine to use, but I guess 1.8.0 compatibility will be required soon...

Most people don't update the Arduino IDE unless they have the need to do it, however I agree that will be better trying that all the software will compile with the latest IDE release. This goal is not always possible, in some personal projects I'm still using IDE 023, because some libraries have never been updated and they are complex to modify (at least for me).
For now seems that the only problem is with the Time library, which as pointed by you is easy to fix.

Regards

Reply
#19

(09-01-2017, 21:49)Zappie Wrote:  Some libraries could have been customized for the WeatherDuino Pro2.

Then it is not a bad idea to give those lib's a different name to prevent loading in other projects, or load wrong lib stored somewhereelse!

Regards, Zappie

In general, I agree with you, however the few changes I did in some of the libraries, never have changed the general functionality of the library, normally I just add an extra function, or functionality. If someone else use one of those libraries for any other project than the WeatherDuino, most likely will not have any problem.

Reply




Users browsing this thread: 1 Guest(s)