This is a macro for:
```
#define addLogMove(L, S) addToLogMove(L, std::move(S))
```
This will then try to move the constructed string to the log buffer.
If it cannot be moved (e.g. log level is not active), the string will be cleared to free up memory.
This does include almost all needed for a plugin.
So it will make intellisense highlighting useful as otherwise almost each line in a plugin file will be marked red.
See the defines in `_Plugin_Helper.h`
They were already used in some plugins, but now made globally available since they make the source much more readable.
All custom GPIO labels (set using `PLUGIN_GET_DEVICEGPIONAMES` ) now use the same format.
It is now uniform to describe GPIO functions on ESP side.
It was quite a mixup of sensor pin descriptions and ESP side descriptions (e.g. mixup of RX and TX)
Now all descriptions show the ESP side description.
Got rid of a few kB in the binary image by removing F-macro from numerous 1 or 2 character flash strings.
These very short strings take more space in flash and memory when using the F-macro.
Also appending to a string using a `'a'` character definition takes less resources compared to a one-character string `"a"`.
See #1351
Whenever a plugin_write returns success = true, the execute command will no longer be called.
It doesn't matter whether the plugin is enabled or present.
It should only return success = true when the command was actually meant for this plugin.
The reason is that inside PLUGIN_WRITE the variable [event->BaseVarIndex] is not set and is always = 0.
So actually this PR modifies the 1st value of task 1 and not the encoder counter.
Line 183 of P059_Encoder.ino should be removed:
UserVar[event->BaseVarIndex] = (float) event->Par1;
A lot of functions in Webserver.ino were just appending to a ever increasing string. These strings were eventually sent to TXBuffer of the Webinterface.
So why not directly send them to the streaming buffer and thus reduce memory usage and gain speed.
* Optimisation: save RAM.
* Another RAM optimisation (freeing RAM by moving static data from RAM to program memory).
* Fixing user-visible typos.
* Fixing typos in variables and comments.
* Fixing typos in comments.
* Revert changes of other pull request.
Changes:
Added PLUGIN_GET_DEVICEGPIONAMES to retreive GPIO-names from plugins
Changed Webserver to ask for GPIO-names (backward compatibility for old plugins)
Added GPIO-names to plugins
- Chiming
- Encoder
- TTP229_KeyPad
- DRF0299_MP3
- HX711_Load_Cell
- (more will follow)
Changed GPIO-names in hardware-page for uniformity
And because it was on the way:
Added PLUGIN_EXIT and prepared to unload members and memory from deselected device plugins