Skip to content

Commit

Permalink
Merge pull request #4851 from tonhuisman/bugfix/P023-template-parsing…
Browse files Browse the repository at this point in the history
…-replaces-template-content

[P023] Bugfix: Template parsing was overwriting the template
  • Loading branch information
TD-er authored Oct 18, 2023
2 parents 0d1c0b5 + dd56de1 commit 1f32e86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/_P023_OLED.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// #######################################################################################################

/** Changelog:
* 2023-10-16 tonhuisman: Bugfix: Template parsing stopped after initial display since previous updates :-(
* 2023-03-18 tonhuisman: Show current on-display content on Devices page (75% size, omits trailing empty lines)
* Manually set content via command: oled,x,y,<content> is included in the Devices page content
* Make Interval optional
Expand Down
5 changes: 3 additions & 2 deletions src/src/PluginStructs/P023_data_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,10 @@ void P023_data_struct::StartUp_OLED(struct EventStruct *event) {

bool P023_data_struct::plugin_read(struct EventStruct *event) {
for (uint8_t x = 0; x < 8; x++) {
String newString = parseTemplate(strings[x], 16);

if (strings[x].length()) {
String tmp = strings[x];
const String newString = parseTemplate(tmp, 16);

sendStrXY(newString.c_str(), x, 0);
currentLines[x] = newString;
}
Expand Down

0 comments on commit 1f32e86

Please sign in to comment.