From a8df9d9f2f1f66636131dabf55e0bc5468e009a6 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Tue, 30 Jan 2024 19:29:04 -0500 Subject: [PATCH] Moved error/warning output to end of 'i' output --- src/HomeSpan.cpp | 16 ++++++++-------- src/Span.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index 4fd5cf4..7ba2970 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -956,15 +956,10 @@ void Span::processSerialCommand(const char *c){ if(!foundInfo) LOG0(" *** ERROR #%d! Required 'AccessoryInformation' Service not found ***\n",++nErrors); - } // Accessories - - LOG0("\nConfigured as Bridge: %s\n",isBridge?"YES":"NO"); - if(hapConfig.configNumber>0) - LOG0("Configuration Number: %d\n",hapConfig.configNumber); - LOG0("\nDatabase Validation: Warnings=%d, Errors=%d\n\n",nWarnings,nErrors); + } // Accessories char d[]="------------------------------"; - LOG0("%-30s %8s %10s %s %s %s %s %s\n","Service","UUID","AID","IID","Update","Loop","Button","Linked Services"); + LOG0("\n%-30s %8s %10s %s %s %s %s %s\n","Service","UUID","AID","IID","Update","Loop","Button","Linked Services"); LOG0("%.30s %.8s %.10s %.3s %.6s %.4s %.6s %.15s\n",d,d,d,d,d,d,d,d); for(int i=0;iServices.size();j++){ @@ -998,9 +993,14 @@ void Span::processSerialCommand(const char *c){ (*it)->sendSize,(*it)->receiveSize,uxQueueSpacesAvailable((*it)->receiveQueue),esp_now_is_peer_exist((*it)->peerInfo.peer_addr)?"":"(max connections exceeded!)"); LOG0("\nSpanPoint using WiFi Channel %d%s\n",channel,WiFi.status()!=WL_CONNECTED?" (subject to change once WiFi connection established)":""); } - + + LOG0("\nConfigured as Bridge: %s\n",isBridge?"YES":"NO"); + if(hapConfig.configNumber>0) + LOG0("Configuration Number: %d\n",hapConfig.configNumber); + LOG0("\nDatabase Validation: Warnings=%d, Errors=%d\n",nWarnings,nErrors); LOG0("\n*** End Info ***\n\n"); } + break; case 'P': { diff --git a/src/Span.h b/src/Span.h index 0697827..0ffcf11 100644 --- a/src/Span.h +++ b/src/Span.h @@ -496,7 +496,7 @@ namespace Characteristic { CREATE_CHAR(double,RelativeHumidityHumidifierThreshold,50,0,100); // humidfier turns on when humidity falls below this threshold CREATE_CHAR(uint32_t,RemainingDuration,60,0,3600); // duration (in seconds) remaining for Service to be active/on CREATE_CHAR(uint8_t,RemoteKey,4,4,15,UP=4,DOWN,LEFT,RIGHT,CENTER,BACK,PLAY_PAUSE=11,INFO=15); // triggers an update when the corresponding key is pressed in the Remote Control widget on an iPhone - CREATE_CHAR(uint8_t,ResetFilterIndication,1,1,1,RESET_FILTER=1); // triggers and update when the user chooses to reset the FilterChangeIndication from the Home App + CREATE_CHAR(uint8_t,ResetFilterIndication,1,1,1,RESET_FILTER=1); // triggers an update when the user chooses to reset the FilterChangeIndication from the Home App CREATE_CHAR(int,RotationDirection,0,0,1,CLOCKWISE,COUNTERCLOCKWISE); // indicates the rotation direction of a fan CREATE_CHAR(double,RotationSpeed,0,0,100); // measured as a percentage CREATE_CHAR(double,Saturation,0,0,100); // color saturation, measured as a percentage