Made first argument of homeSpan.begin() optional

Default is Category::Lighting
This commit is contained in:
Gregg 2020-11-21 13:52:04 -06:00
parent 48699be277
commit 89024bc555
3 changed files with 3 additions and 2 deletions

View File

@ -105,7 +105,7 @@ struct Span{
HapCharList chr; // list of all HAP Characteristics
void begin(Category catID,
void begin(Category catID=DEFAULT_CATEGORY,
char *displayName=DEFAULT_DISPLAY_NAME,
char *hostNameBase=DEFAULT_HOST_NAME,
char *modelName=DEFAULT_MODEL_NAME);

View File

@ -38,6 +38,7 @@
//////////////////////////////////////////////////////
// DEFAULT SETTINGS //
#define DEFAULT_CATEGORY Category::Lighting // change with optional first argument in homeSpan.begin()
#define DEFAULT_DISPLAY_NAME "HomeSpan Server" // change with optional second argument in homeSpan.begin()
#define DEFAULT_HOST_NAME "HomeSpan" // change with optional third argument in homeSpan.begin()
#define DEFAULT_MODEL_NAME "HomeSpan-ESP32" // change with optional fourth argument in homeSpan.begin()

View File

@ -10,7 +10,7 @@ void setup() {
homeSpan.setLogLevel(2);
homeSpan.begin(Category::Lighting,"HomeSpan Benchmark");
homeSpan.begin();
new SpanAccessory(); // Begin by creating a new Accessory using SpanAccessory(), which takes no arguments