From b867adb81ab60ffd2c8bdb3c952c08e17aab145c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20R=C3=B6mhild?= <78248604+oeme-github@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:43:02 +0100 Subject: [PATCH 1/2] Update NexObject.h Add member to store the name --- NexObject.h | 1 + 1 file changed, 1 insertion(+) diff --git a/NexObject.h b/NexObject.h index d9678266..8f87c374 100644 --- a/NexObject.h +++ b/NexObject.h @@ -76,6 +76,7 @@ class NexObject uint8_t __pid; /* Page ID */ uint8_t __cid; /* Component ID */ const char *__name; /* An unique name */ + String __name_str; /* space to store the name */ }; /** * @} From cf26789907cef1a7f4e5e2d86ad4dc57cf1cb02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20R=C3=B6mhild?= <78248604+oeme-github@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:44:07 +0100 Subject: [PATCH 2/2] Update NexObject.cpp store name in the member and link old member __name to it --- NexObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NexObject.cpp b/NexObject.cpp index 081ad73a..fa8ee25f 100644 --- a/NexObject.cpp +++ b/NexObject.cpp @@ -18,7 +18,8 @@ NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name) { this->__pid = pid; this->__cid = cid; - this->__name = name; + this->__name_str = name; + this->__name = __name_str.c_str(); } uint8_t NexObject::getObjPid(void)