Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
db1fb0ce
Commit
db1fb0ce
authored
Feb 10, 2020
by
Michael Ott
Browse files
Check for valid entity pointer in constructSensorTopics()
parent
a3f7e7a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
dcdbpusher/includes/ConfiguratorTemplateEntity.h
View file @
db1fb0ce
...
...
@@ -465,11 +465,14 @@ class ConfiguratorTemplateEntity : public ConfiguratorTemplate<SBase, SGroup> {
// Sensor names are adjusted according to the respective MQTT topics
for
(
auto
&
g
:
_sensorGroups
)
{
for
(
auto
&
s
:
g
->
acquireSensors
())
{
s
->
setMqtt
(
MQTTChecker
::
formatTopic
(
_mqttPrefix
)
+
MQTTChecker
::
formatTopic
(
g
->
getEntity
()
->
getMqttPart
())
+
MQTTChecker
::
formatTopic
(
g
->
getMqttPart
())
+
MQTTChecker
::
formatTopic
(
s
->
getMqtt
()));
s
->
setName
(
s
->
getMqtt
());
std
::
string
mqtt
=
MQTTChecker
::
formatTopic
(
_mqttPrefix
);
if
(
g
->
getEntity
())
{
mqtt
.
append
(
MQTTChecker
::
formatTopic
(
g
->
getEntity
()
->
getMqttPart
()));
}
mqtt
.
append
(
MQTTChecker
::
formatTopic
(
g
->
getMqttPart
()));
mqtt
.
append
(
MQTTChecker
::
formatTopic
(
s
->
getMqtt
()));
s
->
setMqtt
(
mqtt
);
s
->
setName
(
mqtt
);
SensorMetadata
*
sm
=
s
->
getMetadata
();
if
(
sm
)
{
sm
->
setPublicName
(
s
->
getMqtt
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment