Skip to content

Commit

Permalink
Merge mega and fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
tonhuisman committed Dec 1, 2024
2 parents 8ff6c04 + 4131eb9 commit c6bc9f9
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 15 deletions.
19 changes: 14 additions & 5 deletions docs/source/Plugin/P049.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,29 @@ Used libraries: |P049_usedlibraries|
Supported hardware
------------------

|P049_usedby|
.. ..|P049_usedby|
MH-Z19B,
MH-Z19C,
MH-Z19D,
MH-Z19E

Sensor
^^^^^^

See: :ref:`SerialHelper_page`


**TODO**: Complete this documentation...
Commands available
^^^^^^^^^^^^^^^^^^

.. include:: P049_commands.repl

.. Commands available
.. ^^^^^^^^^^^^^^^^^^
Additional infos can be found here: https://emariete.com/en/sensor-co2-mh-z19b/

.. .. include:: P049_commands.repl


**TODO**: Complete this documentation...

.. Events
.. ~~~~~~
Expand Down
24 changes: 24 additions & 0 deletions docs/source/Plugin/P049_commands.repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. csv-table::
:header: "Command", "Explanation"
:widths: 20, 30

"
``MHZCalibrateZero``

``MHZReset``

``MHZABCEnable``

``MHZABCDisable``

","
Sets the zero point of the sensor (in this case 400ppm)

Reset to factory defaults

Enables automatic baseline calibration

Disables automatic baseline calibration
"


6 changes: 3 additions & 3 deletions docs/source/Reference/Command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ P048 :ref:`P048_page`
.. include:: ../Plugin/P048_commands.repl


.. P049 :ref:`P049_page`
.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
P049 :ref:`P049_page`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. .. include:: ../Plugin/P049_commands.repl
.. include:: ../Plugin/P049_commands.repl


.. P050 :ref:`P050_page`
Expand Down
12 changes: 6 additions & 6 deletions src/_C002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ bool CPlugin_002(CPlugin::Function function, struct EventStruct *event, String&
proto.usesExtCreds = true;
proto.defaultPort = 1883;
proto.usesID = true;
#if FEATURE_MQTT_TLS
proto.usesTLS = true;
#endif
# if FEATURE_MQTT_TLS
proto.usesTLS = true;
# endif // if FEATURE_MQTT_TLS
break;
}

Expand Down Expand Up @@ -108,12 +108,12 @@ bool CPlugin_002(CPlugin::Function function, struct EventStruct *event, String&
bool mustSendEvent = false;

switch (Settings.getPluginID_for_task(x).value) {
case 1: // temp solution, if input switch, update state
case 1: // temp solution, if input switch, update state
{
action = strformat(F("gpio,%u,%.2f"), x, nvalue); // FIXME tonhuisman: Was: InputSwitchState
action = strformat(F("gpio,%d,%d"), Settings.TaskDevicePin1[x], static_cast<int>(nvalue));
break;
}
case 29: // temp solution, if plugin 029, set gpio
case 29: // temp solution, if plugin 029, set gpio
{
if (switchtype.equalsIgnoreCase(F("dimmer")))
{
Expand Down
2 changes: 2 additions & 0 deletions static/espeasy.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ var commonPlugins = [
"NeoPixel", "NeoPixelAll", "NeoPixelLine", "NeoPixelHSV", "NeoPixelAllHSV", "NeoPixelLineHSV", "NeoPixelBright",
//P048
"MotorShieldCmd,DCMotor", "MotorShieldCmd,Stepper",
//P049
"MHZCalibrateZero", "MHZReset", "MHZABCEnable", "MHZABCDisable",
//P052
"Sensair_SetRelay",
//P053
Expand Down
2 changes: 1 addition & 1 deletion static/espeasy.min.js

Large diffs are not rendered by default.

0 comments on commit c6bc9f9

Please sign in to comment.