Completed refactoring of 'i' CLI command
All error checking and database validation is now done dynamically every time the 'i' command is run.
This commit is contained in:
parent
18414d8856
commit
f48cea8afb
|
|
@ -181,18 +181,6 @@ void Span::pollTask() {
|
|||
|
||||
processSerialCommand("i"); // print homeSpan configuration info
|
||||
|
||||
if(nFatalErrors>0){
|
||||
Serial.print("\n*** PROGRAM HALTED DUE TO ");
|
||||
Serial.print(nFatalErrors);
|
||||
Serial.print(" FATAL ERROR");
|
||||
if(nFatalErrors>1)
|
||||
Serial.print("S");
|
||||
Serial.print(" IN CONFIGURATION! ***\n\n");
|
||||
while(1);
|
||||
}
|
||||
|
||||
Serial.print("\n");
|
||||
|
||||
HAPClient::init(); // read NVS and load HAP settings
|
||||
|
||||
if(!strlen(network.wifiData.ssid)){
|
||||
|
|
@ -1013,8 +1001,8 @@ void Span::processSerialCommand(const char *c){
|
|||
|
||||
} // Accessories
|
||||
|
||||
Serial.printf("\nDatabase Validation: Warnings=%d, Errors=%d\n\n",nWarnings,nErrors);
|
||||
Serial.printf("Configured as Bridge: %s\n\n",isBridge?"YES":"NO");
|
||||
Serial.printf("\nConfigured as Bridge: %s\n\n",isBridge?"YES":"NO");
|
||||
Serial.printf("Database Validation: Warnings=%d, Errors=%d\n\n",nWarnings,nErrors);
|
||||
|
||||
char d[]="------------------------------";
|
||||
Serial.printf("%-30s %8s %10s %s %s %s %s %s\n","Service","UUID","AID","IID","Update","Loop","Button","Linked Services");
|
||||
|
|
|
|||
|
|
@ -157,8 +157,6 @@ struct Span{
|
|||
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()
|
||||
boolean isInitialized=false; // flag indicating HomeSpan has been initialized
|
||||
int nFatalErrors=0; // number of fatal errors in user-defined configuration
|
||||
int nWarnings=0; // number of warnings errors in user-defined configuration
|
||||
boolean isBridge=true; // flag indicating whether device is configured as a bridge (i.e. first Accessory contains nothing but AccessoryInformation and HAPProtocolInformation)
|
||||
HapQR qrCode; // optional QR Code to use for pairing
|
||||
const char *sketchVersion="n/a"; // version of the sketch
|
||||
|
|
|
|||
Loading…
Reference in New Issue