diff --git a/Sensor-API.md b/Sensor-API.md index b3236989..99029dee 100644 --- a/Sensor-API.md +++ b/Sensor-API.md @@ -134,7 +134,21 @@ It should be wrapped in `#ifdef USE_WEBSERVER ... #endif // USE_WEBSERVER` This callback ID is called to allow a sensor to prepare for saving configuration changes. To be used to save volatile data just before a restart. ### FUNC_COMMAND -This callback ID is called when a sensor specific command ``Sensor\`` is executed where xx is the sensor index. +This callback ID is called when a sensor specific command ``Sensor`` is executed where xx is the sensor index. +``` +// Data struct of FUNC_COMMAND ID +struct XDRVMAILBOX { + uint16_t valid; // ??? + uint16_t index; // Sensor index + uint16_t data_len; // Length of command string + uint16_t payload16; // ??? + int16_t payload; // ??? + uint8_t grpflg; // ??? + uint8_t notused; // ??? + char *topic; // Command topic + char *data; // Command string/value +} XdrvMailbox; +``` ## Useful functions