Update Reference.md

This commit is contained in:
HomeSpan 2022-03-27 18:01:47 -05:00 committed by GitHub
parent 621f4ddd1e
commit 935c3f9810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,7 @@ The following **optional** `homeSpan` methods enable additional features and pro
* can by called from anywhere in a sketch
* `void enableWebLog(uint16_t maxEntries, const char *timeServerURL, const char *timeZone, const char *logURL)`
* enables a rolling web log that displays the most recent *maxEntries* entries created with the [WEBLOG\(\) macro](./#weblog). Parameters, and their default values if unspecified, are as follows:
* enables a rolling web log that displays the most recent *maxEntries* entries created with the [WEBLOG\(\) macro](./#user-macros). Parameters, and their default values if unspecified, are as follows:
* *maxEntries* - maximum number of (most recent) entries to save. If unspecified, defaults to 0, in which case the web log will only display status without any log entries
* *timeServerURL* - the URL of a time server that HomeSpan will use to set its clock upon startup after a WiFi connection has been established. If unspecified, default to NULL, in which case HomeSpan skips setting the device clock
* *timeZone* - specifies the time zone to use for setting the clock. Uses standard Unix timezone formatting as interpreted by Espressif IDF. Note the IDF uses a somewhat non-intuitive convention such that a timezone of "UTC+5:00" *subtracts* 5 hours from UTC time, and "UTC-5:00" *adds* 5 hours to UTC time. If *serverURL=NULL* this field is ignored; if *serverURL!=NULL* this field is required
@ -376,6 +376,8 @@ To create more than one user-defined command, simply create multiple instances o
## User Macros
### LOG1(x), LOG1(const char *fmt, ...), LOG2(x), LOG2(const char *fmt, ...), WEBLOG(const char *fmt, ...)
### *#define REQUIRED VERSION(major,minor,patch)*
If REQUIRED is defined in the main sketch *prior* to including the HomeSpan library with `#include "HomeSpan.h"`, HomeSpan will throw a compile-time error unless the version of the library included is equal to, or later than, the version specified using the VERSION macro. Example: