'TimeChangeRule' does not name a type

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
KayomboS
New user
Posts: 8
Joined: 03 Feb 2018, 12:13

'TimeChangeRule' does not name a type

#1 Post by KayomboS » 03 Feb 2018, 12:26

Hi all,
I managed yesterday to flash my first NodeMCU with the current Arduino IDE (1.8.5). I followed the tutorial https://www.letscontrolit.com/wiki/inde ... are_Upload, using the current ESPEasy-Version (ESPEasy_v2.0-20180203) and had to correct only one line of the code which was highlighted by the compiler. But today, when starting to flash the next NodeMCU, an error occured when comiling, although I did not do any updates or whatever since the last flash. This is the error:

Arduino: 1.8.5 (Linux), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

WARNUNG: Kategorie 'LED' in der Bibliothek CHT16K33 LED Matrix Library ist ungültig und wird auf 'Uncategorized' festgelegt
WARNUNG: Kategorie 'Input' in der Bibliothek MechInputs ist ungültig und wird auf 'Uncategorized' festgelegt
WARNUNG: Kategorie 'Input' in der Bibliothek SerialSensors ist ungültig und wird auf 'Uncategorized' festgelegt
TimeZoneESPeasy:69: error: 'TimeChangeRule' does not name a type
void setTimeZone(const TimeChangeRule& dstStart, const TimeChangeRule& stdStart, uint32_t curTime) {
^
TimeZoneESPeasy:69: error: ISO C++ forbids declaration of 'dstStart' with no type [-fpermissive]
void setTimeZone(const TimeChangeRule& dstStart, const TimeChangeRule& stdStart, uint32_t curTime) {
^
TimeZoneESPeasy:69: error: 'TimeChangeRule' does not name a type
void setTimeZone(const TimeChangeRule& dstStart, const TimeChangeRule& stdStart, uint32_t curTime) {
^
TimeZoneESPeasy:69: error: ISO C++ forbids declaration of 'stdStart' with no type [-fpermissive]
void setTimeZone(const TimeChangeRule& dstStart, const TimeChangeRule& stdStart, uint32_t curTime) {
^
TimeZoneESPeasy:140: error: 'TimeChangeRule' does not name a type
uint32_t calcTimeChangeForRule(const TimeChangeRule& r, int yr)
^
TimeZoneESPeasy:140: error: ISO C++ forbids declaration of 'r' with no type [-fpermissive]
uint32_t calcTimeChangeForRule(const TimeChangeRule& r, int yr)
^
exit status 1
'TimeChangeRule' does not name a type

Is there any chance to give me a hint where to look after?

Thanx in advance

KayomboS

EDIT:
Sorry I forgot something to mention:
This behaviour is linked to the change of the setting: #define FEATURE_ADC_VCC true / false
If I change it to "true" the TimeChangeRule'-error comes up.

TD-er
Core team member
Posts: 9905
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: 'TimeChangeRule' does not name a type

#2 Post by TD-er » 03 Feb 2018, 15:13

It looks like the Arduino IDE is missing the forward declarations I made in the ESPEasyTimeTypes class.
https://github.com/letscontrolit/ESPEas ... imeTypes.h
I am developing in Atom with PlatformIO and I thought I also tested it in the Arduino IDE.

I never tested by changing the FEATURE_ADC_VCC define.
Maybe the include of the header file ESPEasyTimeTypes.h (which is done in ESPeasy.ino if I remember correctly) should be done earlier?

KayomboS
New user
Posts: 8
Joined: 03 Feb 2018, 12:13

Re: 'TimeChangeRule' does not name a type

#3 Post by KayomboS » 03 Feb 2018, 15:53

Yepp, I place the include in line 115 of ESPEasy.ino and the error message does not occur anymore. Will test if FEATURE_ADC_VCC will work now.

Thanx for your input.

Who is online

Users browsing this forum: Anthropic Claude Bot [bot], OpenAI Searchbot [bot] and 16 guests