@@ -231,11 +231,11 @@ void contentInfo(ChunkedPrint &chunked) {
231231 }
232232 tagDivClose (chunked);
233233
234- #ifdef ENABLE_EXTRA_DIAG
234+ #ifdef ENABLE_EXTENDED_WEBUI
235235 tagLabelDiv (chunked, F (" Ethernet Sockets" ));
236236 chunked.print (maxSockNum);
237237 tagDivClose (chunked);
238- #endif /* ENABLE_EXTRA_DIAG */
238+ #endif /* ENABLE_EXTENDED_WEBUI */
239239
240240 tagLabelDiv (chunked, F (" MAC Address" ));
241241 for (byte i = 0 ; i < 6 ; i++) {
@@ -269,11 +269,11 @@ void contentStatus(ChunkedPrint &chunked) {
269269 tagLabelDiv (chunked, F (" Daikin Indoor Unit" ));
270270 tagSpan (chunked, JSON_DAIKIN_INDOOR);
271271 tagDivClose (chunked);
272- #ifdef ENABLE_EXTRA_DIAG
272+ #ifdef ENABLE_EXTENDED_WEBUI
273273 tagLabelDiv (chunked, F (" Daikin Outdoor Unit" ));
274274 tagSpan (chunked, JSON_DAIKIN_OUTDOOR);
275275 tagDivClose (chunked);
276- #endif /* ENABLE_EXTRA_DIAG */
276+ #endif /* ENABLE_EXTENDED_WEBUI */
277277 tagLabelDiv (chunked, F (" Date" ));
278278 tagSpan (chunked, JSON_DATE);
279279 tagDivClose (chunked);
@@ -308,21 +308,21 @@ void contentStatus(ChunkedPrint &chunked) {
308308 tagSpan (chunked, JSON_WRITE_P1P2);
309309 tagDivClose (chunked);
310310 chunked.print (F (" </form><form method=post>" ));
311- #ifdef ENABLE_EXTRA_DIAG
311+ #ifdef ENABLE_EXTENDED_WEBUI
312312 tagLabelDiv (chunked, F (" Run Time" ));
313313 tagSpan (chunked, JSON_RUNTIME);
314314 tagDivClose (chunked);
315- #endif /* ENABLE_EXTRA_DIAG */
315+ #endif /* ENABLE_EXTENDED_WEBUI */
316316 tagLabelDiv (chunked, F (" P1P2 Packets" ));
317317 tagButton (chunked, F (" Reset" ), ACT_RESET_STATS);
318318 chunked.print (F (" Stats since " ));
319319 tagSpan (chunked, JSON_P1P2_STATS);
320320 tagDivClose (chunked);
321- #ifdef ENABLE_EXTRA_DIAG
321+ #ifdef ENABLE_EXTENDED_WEBUI
322322 tagLabelDiv (chunked, F (" UDP Messages" ));
323323 tagSpan (chunked, JSON_UDP_STATS);
324324 tagDivClose (chunked);
325- #endif /* ENABLE_EXTRA_DIAG */
325+ #endif /* ENABLE_EXTENDED_WEBUI */
326326}
327327
328328// IP Settings
@@ -403,7 +403,7 @@ void contentP1P2(ChunkedPrint &chunked) {
403403 tagSelect (chunked, POST_CONTROL_MODE, optionsList, 3 , data.config .controllerMode );
404404 tagDivClose (chunked);
405405 tagLabelDiv (chunked, F (" Connection Timeout" ));
406- tagInputNumber (chunked, POST_TIMEOUT, F0THRESHOLD, 60 , data.config .connectTimeout , F (" secs " ));
406+ tagInputNumber (chunked, POST_TIMEOUT, F0THRESHOLD, 60 , data.config .connectTimeout , F (" s " ));
407407 tagDivClose (chunked);
408408 tagLabelDiv (chunked, F (" EEPROM Write Quota" ));
409409 tagInputNumber (chunked, POST_QUOTA, 0 , 100 , data.config .writeQuota , F (" writes per day" ));
@@ -639,7 +639,7 @@ void stringDate(ChunkedPrint &chunked, byte myDate[]) {
639639
640640void jsonVal (ChunkedPrint &chunked, const byte JSONKEY) {
641641 switch (JSONKEY) {
642- #ifdef ENABLE_EXTRA_DIAG
642+ #ifdef ENABLE_EXTENDED_WEBUI
643643 case JSON_RUNTIME:
644644 chunked.print (seconds / (3600UL * 24L ));
645645 chunked.print (F (" days, " ));
@@ -668,19 +668,19 @@ void jsonVal(ChunkedPrint &chunked, const byte JSONKEY) {
668668 }
669669 }
670670 break ;
671- #endif /* ENABLE_EXTRA_DIAG */
671+ #endif /* ENABLE_EXTENDED_WEBUI */
672672 case JSON_DAIKIN_INDOOR:
673673 {
674674 chunked.print (daikinIndoor);
675675 }
676676 break ;
677- #ifdef ENABLE_EXTRA_DIAG
677+ #ifdef ENABLE_EXTENDED_WEBUI
678678 case JSON_DAIKIN_OUTDOOR:
679679 {
680680 chunked.print (daikinOutdoor);
681681 }
682682 break ;
683- #endif /* ENABLE_EXTRA_DIAG */
683+ #endif /* ENABLE_EXTENDED_WEBUI */
684684 case JSON_DATE:
685685 {
686686 stringDate (chunked, date);
@@ -692,7 +692,11 @@ void jsonVal(ChunkedPrint &chunked, const byte JSONKEY) {
692692 chunked.print (F (" <br>" ));
693693 chunked.print (data.eepromDaikin .total );
694694 chunked.print (F (" Total Commands<br>" ));
695- chunked.print ((uint16_t )(data.eepromDaikin .total / (days (date) - days (data.eepromDaikin .date ) + 1 )));
695+ if (date[5 ] != 0 ) { // day can not be zero
696+ chunked.print ((uint16_t )(data.eepromDaikin .total / (days (date) - days (data.eepromDaikin .date ) + 1 )));
697+ } else {
698+ chunked.print (F (" -" ));
699+ }
696700 chunked.print (F (" Daily Average (should be bellow 19)<br>" ));
697701 chunked.print (data.eepromDaikin .yesterday );
698702 chunked.print (F (" Yesterday<br>" ));
0 commit comments