keep variable after restart
Re: keep variable after restart
Is this bug been fixed? Or should we still be using another dummy RTC_DATA_ATTR variable just to keep the memory powered up?
Re: keep variable after restart
Yes, has been fixed in https://github.com/espressif/esp-idf/co ... 158dbf6b4b for master and release/v3.2, and in https://github.com/espressif/esp-idf/co ... 7143985edc for release/v3.1.
Re: keep variable after restart
Hi,
RTC_NOINIT_ATTR int waitFlag = 0;
Serial.println((String)waitFlag);
Why do I get this?
1881730620
Regards
JPD
RTC_NOINIT_ATTR int waitFlag = 0;
Serial.println((String)waitFlag);
Why do I get this?
1881730620
Regards
JPD
Arduino 1.8.10; Windows 10; ESP32 VROOM
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: keep variable after restart
...because you tell the compiler not to initialize the variable, and that seemingly takes precedence over the fact that you tell it to initialize the variable.
Who is online
Users browsing this forum: Baidu [Spider] and 74 guests