Update Reference.md

This commit is contained in:
HomeSpan 2022-03-28 18:48:28 -05:00 committed by GitHub
parent c96bf8c590
commit f2de496fa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 13 deletions

View File

@ -375,19 +375,6 @@ might be used to save all the elements in *myArray* when called with just the '@
To create more than one user-defined command, simply create multiple instances of SpanUserCommand, each with its own single-letter name. Note that re-using the same single-letter name in an instance of SpanUserCommand over-rides any previous instances using that same letter.
## Message Logging Macros
### *LOG1(X)* and *LOG2(X)*
### *LOG1(const char \*fmt, ...)* and *LOG2(const char \*fmt, ...)*
Displays user-defined log messages on the Arduino Serial Monitor according to the log level specified with `setLogLevel()`, or as specified at runtime with the 'L' command via the [HomeSpan CLI](CLI.md). `LOG1()` messages will be output only if the log level is set to 1 or greater. `LOG2()` messages will be output only if the log level is set to 2.
* In the first form (e.g. `LOG1(X)`), the macro calls `Serial.print(X)`. The argument *X* can be any variable recognized by the Arduino `Serial.print()` function. For example, `int val=255; LOG1(val);` outputs "255" to the Serial Monitor
* In the second form (e.g. `LOG1(const char *fmt, ...)`), the macro calls `Serial.printf(fmt, ...)` enabling you to create printf-style formatted output. For example, `int val=255; LOG1("The value is: %X",val);` outputs the "The value is: FF" to the Serial Monitor
* See [Example 9 - MessageLogging](https://github.com/HomeSpan/HomeSpan/blob/master/docs/Tutorials.md#example-9---messagelogging) for a tutorial sketch demonstrating these functions
### WEBLOG(const char *fmt, ...)
## Custom Characteristics and Custom Services Macros
### *CUSTOM_CHAR(name,uuid,perms,format,defaultValue,minValue,maxValue,staticRange)*