Skip to content

Commit 1b50fba

Browse files
author
Gregory Schmidt
committed
Additional Flash string concat
1 parent 303fc65 commit 1b50fba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

usermods/seven_segment_display/usermod_v2_seven_segment_display.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class SevenSegmentDisplay : public Usermod
4343
// D
4444
*/
4545
int ssDisplayConfig = 5; //Physical configuration of the Seven segment display
46-
String ssDisplayMessage = "testing123";
46+
String ssDisplayMessage = "~";
4747
bool ssTimeEnabled = true; //If not, display message.
4848
unsigned int ssScrollSpeed = 1000; //Time between advancement of extended message scrolling, in milliseconds.
4949

@@ -273,7 +273,7 @@ class SevenSegmentDisplay : public Usermod
273273

274274
char buffer[64];
275275
char valBuffer[12];
276-
sprintf_P(buffer, PSTR("%s/sevenSeg/%S"), mqttDeviceTopic, subTopic);
276+
sprintf_P(buffer, PSTR("%s/%S/%S"), mqttDeviceTopic, _str_sevenSeg, subTopic);
277277
sprintf_P(valBuffer, PSTR("%d"), value);
278278
mqtt->publish(buffer, 2, true, valBuffer);
279279
}
@@ -282,7 +282,7 @@ class SevenSegmentDisplay : public Usermod
282282
{
283283
if(mqtt == NULL) return;
284284
char buffer[64];
285-
sprintf_P(buffer, PSTR("%s/sevenSeg/%S"), mqttDeviceTopic, subTopic);
285+
sprintf_P(buffer, PSTR("%s/%S/%S"), mqttDeviceTopic, _str_sevenSeg, subTopic);
286286
mqtt->publish(buffer, 2, true, Value.c_str(), Value.length());
287287
}
288288

@@ -399,14 +399,14 @@ class SevenSegmentDisplay : public Usermod
399399
{
400400
_updateMQTT();
401401
//subscribe for sevenseg messages on the device topic
402-
sprintf_P(subBuffer, PSTR("%s/sevenSeg/+/set"), mqttDeviceTopic);
402+
sprintf_P(subBuffer, PSTR("%s/%S/+/set"), mqttDeviceTopic, _str_sevenSeg);
403403
mqtt->subscribe(subBuffer, 2);
404404
}
405405

406406
if (mqttGroupTopic[0] != 0)
407407
{
408408
//subcribe for sevenseg messages on the group topic
409-
sprintf_P(subBuffer, PSTR("%s/sevenSeg/+/set"), mqttGroupTopic);
409+
sprintf_P(subBuffer, PSTR("%s/%S/+/set"), mqttGroupTopic, _str_sevenSeg);
410410
mqtt->subscribe(subBuffer, 2);
411411
}
412412
}

0 commit comments

Comments
 (0)