Moved default parameters for homeSpan.begin() to Settings.h

This commit is contained in:
Gregg 2020-09-27 22:52:03 -05:00
parent 2d8f36e735
commit 381b25860a
2 changed files with 18 additions and 11 deletions

View File

@ -50,9 +50,9 @@ struct Span{
char category[3]=""; // category ID of primary accessory - broadcast as Bonjour field "ci" (HAP Section 13) char category[3]=""; // category ID of primary accessory - broadcast as Bonjour field "ci" (HAP Section 13)
unsigned long snapTime; // current time (in millis) snapped before entering Service loops() or updates() unsigned long snapTime; // current time (in millis) snapped before entering Service loops() or updates()
char *defaultSetupCode=DEFAULT_SETUP_CODE; // default configuration parameters char *defaultSetupCode=DEFAULT_SETUP_CODE; // Setup Code used for pairing
uint8_t statusPin=DEFAULT_STATUS_PIN; uint8_t statusPin=DEFAULT_STATUS_PIN; // pin for status LED
uint8_t controlPin=DEFAULT_CONTROL_PIN; uint8_t controlPin=DEFAULT_CONTROL_PIN; // pin for Control Pushbutton
Blinker statusLED; // indicates HomeSpan status Blinker statusLED; // indicates HomeSpan status
PushButton controlButton; // controls HomeSpan configuration and resets PushButton controlButton; // controls HomeSpan configuration and resets
@ -66,9 +66,9 @@ struct Span{
unordered_map<uint64_t, uint32_t> TimedWrites; // map of timed-write PIDs and Alarm Times (based on TTLs) unordered_map<uint64_t, uint32_t> TimedWrites; // map of timed-write PIDs and Alarm Times (based on TTLs)
void begin(Category catID, void begin(Category catID,
char *displayName="HomeSpan Server", char *displayName=DEFAULT_DISPLAY_NAME,
char *hostNameBase="HomeSpan", char *hostNameBase=DEFAULT_HOST_NAME,
char *modelName="HS-ESP32"); char *modelName=DEFAULT_MODEL_NAME);
void poll(); // poll HAP Clients and process any new HAP requests void poll(); // poll HAP Clients and process any new HAP requests
int getFreeSlot(); // returns free HAPClient slot number. HAPClients slot keep track of each active HAPClient connection int getFreeSlot(); // returns free HAPClient slot number. HAPClients slot keep track of each active HAPClient connection

View File

@ -11,11 +11,18 @@
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// DEFAULT SETTINGS // DEFAULT SETTINGS
#define DEFAULT_SETUP_CODE "46637726" // changed during network setup or with 'S' command #define DEFAULT_DISPLAY_NAME "HomeSpan Server" // change with optional second argument in homeSpan.begin()
#define DEFAULT_CONTROL_PIN 21 // change with homeSpan.setControlPin(pin) #define DEFAULT_HOST_NAME "HomeSpan" // change with optional third argument in homeSpan.begin()
#define DEFAULT_STATUS_PIN LED_BUILTIN // change with homeSpan.setStatusPin(pin) #define DEFAULT_MODEL_NAME "HomeSpan-ESP32" // change with optional fourth argument in homeSpan.begin()
#define DEFAULT_AP_PASSWORD "homespan" // change with homeSpan.setApPassword(pwd)
#define DEFAULT_AP_TIMEOUT 120 // change with homeSpan.setApTimeout(nSeconds) #define DEFAULT_SETUP_CODE "46637726" // changed during network setup or with 'S' command
#define DEFAULT_CONTROL_PIN 21 // change with homeSpan.setControlPin(pin)
#define DEFAULT_STATUS_PIN LED_BUILTIN // change with homeSpan.setStatusPin(pin)
#define DEFAULT_AP_PASSWORD "homespan" // change with homeSpan.setApPassword(pwd)
#define DEFAULT_AP_TIMEOUT 120 // change with homeSpan.setApTimeout(nSeconds)
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// Maximum number of simultaenous IP connections // // Maximum number of simultaenous IP connections //