@@ -629,15 +629,6 @@ bool sml_get_list_entries (uint16_t layer)
629629 // Also: an info_len > 2 could be due to corrupt data. So better break.
630630 uint16 len_info = (*cur_serial_buf & SML_EXT_LENGTH) ? 2 : 1 ;
631631
632- #ifdef undef
633- DPRINT (DBG_INFO, " get_list_entries" );
634- DBGPRINT (" , layer " + String (layer));
635- DBGPRINT (" , entries " + String (sml_list_layer_entries[layer]));
636- DBGPRINT (" , type 0x" + String (type, HEX));
637- DBGPRINT (" , len_info " + String (len_info));
638- DBGPRINTLN (" , sml_len " + String (sml_serial_len));
639- #endif
640-
641632 if (sml_serial_len < len_info) {
642633 if (cur_serial_buf > sml_serial_buf) {
643634 memmove (sml_serial_buf, cur_serial_buf, sml_serial_len);
@@ -745,9 +736,7 @@ bool sml_get_list_entries (uint16_t layer)
745736 layer++;
746737 cur_sml_list_layer = layer;
747738 sml_list_layer_entries[layer] = entry_len;
748- #ifdef undef
749- DPRINTLN (DBG_INFO, " Open layer " + String (layer) + " , entries " + String (entry_len));
750- #endif
739+ DPRINTLN (DBG_VERBOSE, " Open layer " + String (layer) + " , entries " + String (entry_len));
751740 if (!sml_serial_len) {
752741 error = true ;
753742 }
@@ -779,9 +768,7 @@ bool sml_get_list_entries (uint16_t layer)
779768 }
780769 }
781770 while (!sml_list_layer_entries[layer]) {
782- #ifdef undef
783- DPRINTLN (DBG_INFO, " COMPLETE, layer " + String (layer));
784- #endif
771+ DPRINTLN (DBG_VERBOSE, " COMPLETE, layer " + String (layer));
785772 if (layer) {
786773 layer--;
787774 cur_sml_list_layer = layer;
@@ -834,9 +821,7 @@ uint16_t sml_parse_stream (uint16 len)
834821 cur_serial_buf = sml_serial_buf;
835822 }
836823 sml_state = SML_ST_FIND_VERSION;
837- #ifdef undef
838- DPRINTLN (DBG_INFO, " START_TAG, rest " + String (sml_serial_len));
839- #endif
824+ DPRINTLN (DBG_VERBOSE, " START_TAG, rest " + String (sml_serial_len));
840825 } else {
841826 cur_serial_buf = last_serial_buf + sml_serial_len;
842827 last_serial_buf = cur_serial_buf;
@@ -861,13 +846,8 @@ uint16_t sml_parse_stream (uint16 len)
861846 sml_telegram_crc = sml_calc_crc (sml_telegram_crc, sizeof (version_seq), cur_serial_buf);
862847 sml_msg_failure = 0 ;
863848 sml_state = SML_ST_FIND_MSG;
864- #ifdef undef
865- DPRINTLN (DBG_INFO, " VERSION, rest " + String (sml_serial_len - sizeof (version_seq)));
866- #endif
849+ DPRINTLN (DBG_VERBOSE, " VERSION, rest " + String (sml_serial_len - sizeof (version_seq)));
867850 } else {
868- #ifdef undef
869- DPRINTLN (DBG_INFO, " no VERSION, rest " + String (sml_serial_len - sizeof (version_seq)));
870- #endif
871851 sml_state = SML_ST_FIND_START_TAG;
872852 }
873853 sml_serial_len -= sizeof (version_seq);
@@ -892,10 +872,8 @@ uint16_t sml_parse_stream (uint16 len)
892872 parse_continue = true ;
893873 } else if ((*cur_serial_buf & 0x70 ) == 0x70 ) {
894874 /* todo: extended list on 1st level (does this happen in real life?) */
875+ DPRINTLN (DBG_VERBOSE, " TOPLIST 0x" + String (*cur_serial_buf, HEX) + " , rest " + String (sml_serial_len - 1 ));
895876 sml_telegram_crc = sml_calc_crc (sml_telegram_crc, 1 , cur_serial_buf);
896- #ifdef undef
897- DPRINTLN (DBG_INFO, " TOPLIST 0x" + String (*cur_serial_buf, HEX) + " , rest " + String (sml_serial_len - 1 ));
898- #endif
899877 sml_state = SML_ST_FIND_LIST_ENTRIES;
900878 cur_sml_list_layer = 0 ;
901879 sml_message = SML_MSG_NONE;
@@ -951,9 +929,7 @@ uint16_t sml_parse_stream (uint16 len)
951929 sml_state = SML_ST_FIND_LIST_ENTRIES;
952930 sml_list_layer_entries[cur_sml_list_layer]--;
953931 while (!sml_list_layer_entries[cur_sml_list_layer]) {
954- #ifdef undef
955- DPRINTLN (DBG_INFO, " COMPLETE, layer " + String (cur_sml_list_layer));
956- #endif
932+ DPRINTLN (DBG_VERBOSE, " COMPLETE, layer " + String (cur_sml_list_layer));
957933 if (cur_sml_list_layer) {
958934 cur_sml_list_layer--;
959935 } else {
@@ -1006,7 +982,7 @@ uint16_t sml_parse_stream (uint16 len)
1006982 " , Yield in " + String (obis_yield_in_all_value) +
1007983 " , Yield out " + String (obis_yield_out_all_value));
1008984#else
1009- DPRINTLN (DBG_INFO , " Power " + String (obis_power_all_value));
985+ DPRINTLN (DBG_VERBOSE , " Power " + String (obis_power_all_value));
1010986#endif
1011987 sml_handle_obis_pac (obis_power_all_value);
1012988 } else {
0 commit comments