Reference to XdrvMailbox.index and example call of parser function added to section FUNC_COMMAND ID.

Rene 'Renne' Bartsch 2018-07-17 17:31:04 +02:00
parent 31a262fca8
commit 03da3d7439
1 changed files with 8 additions and 0 deletions

@ -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 {