mirror of https://github.com/arendst/Tasmota.git
Reference to XdrvMailbox.index and example call of parser function added to section FUNC_COMMAND ID.
parent
31a262fca8
commit
03da3d7439
|
@ -135,6 +135,14 @@ This callback ID is called to allow a sensor to prepare for saving configuration
|
|||
|
||||
### FUNC_COMMAND
|
||||
This callback ID is called when a sensor specific command ``Sensor<xx>`` is executed where xx is the sensor index.
|
||||
```
|
||||
case FUNC_COMMAND:
|
||||
if (XSNS_<driver_ID> == XdrvMailbox.index) {
|
||||
result = <driver_name>Command() { ... }; // Return true on success
|
||||
}
|
||||
break;
|
||||
|
||||
```
|
||||
```
|
||||
// Data struct of FUNC_COMMAND ID
|
||||
struct XDRVMAILBOX {
|
||||
|
|
Loading…
Reference in New Issue