[help] many difficulties to compile a plugin

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
tparvais
Normal user
Posts: 20
Joined: 28 Oct 2015, 23:13

[help] many difficulties to compile a plugin

#1 Post by tparvais » 10 Aug 2018, 17:36

Hello

Generally, the compilation of production code "Mega" as available on github is working fine on Arduino 1.8.5 and ESP8266 board (2.3.0)

I want to compile a dev plugin available on https://github.com/jodur/ESPEASY_Plugin_ITHO

I simply copy it to my source file, copy also the libraries to arduino lib and uncomment #define PLUGIN_BUILD_DEV in ESPEASY.ino (btw, I'm not sure this plugin used this flag for compilation).

When compiling the all stuff, I got error
_P145_Itho:150: error: 'PLUGIN_EXIT' was not declared in this scope
case PLUGIN_EXIT
indeed, PLUGIN_EXIT does not seem to be something existing (yet?) in mega-ESPEeasy framework.

Is that correct ?

any help would be very appreciated

Thomas

TD-er
Normal user
Posts: 1158
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: [help] many difficulties to compile a plugin

#2 Post by TD-er » 10 Aug 2018, 22:21

Just add that PLUGIN_EXIT case and set success to true.
There is no pointer to a struct which has to be deleted, so it can be something like:

Code: Select all

     case PLUGIN_EXIT:
        {
          success = true;
          break;
        }

Your next error you will probably experience is caused by this section:

Code: Select all

     case PLUGIN_WEBFORM_LOAD:
        {
		  addFormSubHeader(string, F("Remote RF Controls"));
          addFormTextBox(string, F("Unit ID remote 1"), F("PLUGIN_145_ID1"), PLUGIN_145_ExtraSettings.ID1, 23);
          addFormTextBox(string, F("Unit ID remote 2"), F("PLUGIN_145_ID2"), PLUGIN_145_ExtraSettings.ID2, 23);
          addFormTextBox(string, F("Unit ID remote 3"), F("PLUGIN_145_ID3"), PLUGIN_145_ExtraSettings.ID3, 23);
          success = true;
          break;
        }
You will have to remove the "string" parameter in these function calls. At least, when you are using a fairly recent version of the source tree of ESPeasy.

tparvais
Normal user
Posts: 20
Joined: 28 Oct 2015, 23:13

Re: [help] many difficulties to compile a plugin

#3 Post by tparvais » 10 Aug 2018, 22:52

Thank you for feedback.

This is definitely a nightmare for me to compile it on the last source :-(

Many many compilation errors :-(

Thomas

tparvais
Normal user
Posts: 20
Joined: 28 Oct 2015, 23:13

Re: [help] many difficulties to compile a plugin

#4 Post by tparvais » 31 Aug 2018, 16:50

it"s done, compiled and it works partially, but at least for the tasks I need

Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest