show received (ignored) handlers for devices without registered telegrams.

This commit is contained in:
MichaelDvP
2022-11-30 16:06:06 +01:00
parent 085f5ff22f
commit 996063d76d

View File

@@ -350,14 +350,8 @@ void EMSdevice::show_telegram_handlers(uuid::console::Shell & shell) const {
// list all the telegram type IDs for this device, outputting to a string (max size 200) // list all the telegram type IDs for this device, outputting to a string (max size 200)
char * EMSdevice::show_telegram_handlers(char * result, const size_t len, const uint8_t handlers) { char * EMSdevice::show_telegram_handlers(char * result, const size_t len, const uint8_t handlers) {
uint8_t size = telegram_functions_.size();
strlcpy(result, "", len); strlcpy(result, "", len);
if (!size) {
return result;
}
uint8_t i = 0; uint8_t i = 0;
for (const auto & tf : telegram_functions_) { for (const auto & tf : telegram_functions_) {
if (handlers == Handlers::ALL || (handlers == Handlers::RECEIVED && tf.received_ && !tf.fetch_) if (handlers == Handlers::ALL || (handlers == Handlers::RECEIVED && tf.received_ && !tf.fetch_)