Problems compiling old version of source code

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
YelloT
New user
Posts: 7
Joined: 18 Jul 2020, 12:49

Problems compiling old version of source code

#1 Post by YelloT » 18 Jul 2020, 13:19

Hi guys, a newbie question - hope you can bear with me:

I am trying to compile an old version of the ESP Easy mega branch; I need to get an experiment I made on that up and running (RD200M Radon sensor).
My custom code fails on latest ESP Easy release, so I need to backtrack to the (very) old version where I have everything up and running.
The version I am trying to compile in Visual Studio Code is Mega v2.0.0-dev11 release date: Mon Jul 17 00:55:29 CEST 2017.

Trying to compile in Visual Studio Code gives me the following error message:
Error: Invalid 'D:\Kode\ESPEasy-mega\ESPEasy-mega\platformio.ini' (project configuration file): 'No section: 'env''
As an attempt to fix the environment error, I replaced the platformio_*ini files with the updated ones from the latest source code version.

That allowed me to start compiling, but the compilation fails with the following errrors:

.pio\libdeps\dev_ESP8266_4M1M\ESPeasySerial\ESPEasySC16IS752_Serial.cpp:66:17: error: 'class SC16IS752' has no member named 'beginA'
_i2cuart->beginA(speed);
.pio\libdeps\dev_ESP8266_4M1M\ESPeasySerial\ESPEasySC16IS752_Serial.cpp:69:17: error: 'class SC16IS752' has no member named 'beginB'
_i2cuart->beginB(speed);
^
*** [.pio\build\dev_ESP8266_4M1M\libb2d\ESPeasySerial\ESPEasySC16IS752_Serial.cpp.o] Error 1

Anyone have a suggestion for a newbie on how to resolve this? Any advice is greatly appreciated :-)

Thanks!

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

Re: Problems compiling old version of source code

#2 Post by TD-er » 18 Jul 2020, 13:45

Remove the references to ESPeasySerial from the platformio ini files and add it to its own section of lib_ignore in the [common] section.

User avatar
YelloT
New user
Posts: 7
Joined: 18 Jul 2020, 12:49

Re: Problems compiling old version of source code

#3 Post by YelloT » 18 Jul 2020, 19:34

Thanks for a quick reply!
I have tried that, but got new error messages related to missing SoftwareSerial on compile.
lib\SerialDevices\SensorSerial.cpp:29:169: error: no matching function for call to 'SoftwareSerial::SoftwareSerial(int&, int&, bool&, unsigned int&)'

I assume best way to get my project up and running again is to try to reimplement my experimental RD200M radon sensor plugin code based on latest version.
The problem using latest version of the code is that I run into a problem with timerSensor, which does not seem work anymore:
timerSensor[event->TaskIndex] = millis() + 15000;
This is used to delay sensor initiation (similar to earlier version of MH-Z19 code).
Will need to figure out how I can reimplement.

Best regards,
Cato
(Patron of Grovkillen & TD-er)

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

Re: Problems compiling old version of source code

#4 Post by TD-er » 18 Jul 2020, 23:23

You could implement it in various ways.

One is to call schedule_task_device_timer to schedule a new call to PLUGIN_READ for a given task index.
For example if you call it from the PLUGIN_INIT function, or if it is needed on a regular base from the PLUGIN_ONCE_A_SECOND where you may want to keep track of the current state of the sensor's reading process.
Let's say you need to wait for some time, you can keep track of it and monitor this in the PLUGIN_ONCE_A_SECOND call and if it is ready, you could call schedule_task_device_timer to make sure the PLUGIN_READ is called at your set interval.

N.B. this scheduled action can only occur once per task, so you can also call this function to override or reset a scheduled call.
That's why I also mentioned you could call it from the PLUGIN_INIT call.

User avatar
YelloT
New user
Posts: 7
Joined: 18 Jul 2020, 12:49

Re: Problems compiling old version of source code

#5 Post by YelloT » 21 Jul 2020, 18:27

Thank you - got it working and up and running now :-)

Best regards,
Cato
(Patron of Grovkillen & TD-er)

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

Re: Problems compiling old version of source code

#6 Post by TD-er » 21 Jul 2020, 22:10

You're welcome and thank you :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 60 guests