From b2f1a74133598f6498578928b649f523783ed072 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 16 Dec 2024 08:28:19 +0100 Subject: [PATCH] Moved fields from thing to corething --- ControlCore/CoreThing.h | 5 +++-- Thing.h | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ControlCore/CoreThing.h b/ControlCore/CoreThing.h index 025f372..7e0d32d 100644 --- a/ControlCore/CoreThing.h +++ b/ControlCore/CoreThing.h @@ -8,9 +8,10 @@ public: unsigned char networkId; unsigned char id; // CoreThing *parent; + /// @brief The type of Thing unsigned char type; - const char *name; - const char *modelUrl; + const char *name = nullptr; + const char *modelUrl = nullptr; // protected Sensor sensor; static CoreThing *allThings[]; diff --git a/Thing.h b/Thing.h index 9989789..ff09d83 100644 --- a/Thing.h +++ b/Thing.h @@ -18,10 +18,7 @@ public: /// @char The id of the thing unsigned char id; - /// @brief The type of Thing - unsigned int type; - const char *name = nullptr; void SetName(const char *name); // I hate this, better is to have an additional field stating the thing @@ -107,7 +104,6 @@ public: unsigned char childCount = 0; - const char *modelUrl = nullptr; float modelScale = 1; virtual void SendBytes(unsigned char *buffer, unsigned char *ix) {};