Skip to content

Commit 2829d05

Browse files
authored
Merge pull request #7 from fourstix/print-pipe
Print pipe
2 parents 26d2571 + faea8b5 commit 2829d05

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

firmware/OpenLCD/OpenLCD.ino

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,19 @@ void updateDisplay()
262262
modeRecordCustomChar = true; //Change to this special mode
263263
}
264264

265-
//Display custom characters
266-
else if (incoming >= 35 && incoming <= 43)
265+
//Display custom characters, 8 characters allowed, 35 to 42 inclusive
266+
else if (incoming >= 35 && incoming <= 42)
267267
{
268268
SerLCD.write(byte(incoming - 35)); //You write location zero to display customer char 0
269269
}
270+
//If we get a second special setting character, then write it to the display
271+
//This allows us to print a pipe by escaping it as a double
272+
else if (incoming == SPECIAL_SETTING) {
273+
SerLCD.write(incoming);
270274

275+
currentFrame[characterCount++] = incoming; //Record this character to the display buffer
276+
if (characterCount == settingLCDwidth * settingLCDlines) characterCount = 0; //Wrap condition
277+
}
271278
modeSetting = false;
272279
}
273280
else if (modeTWI == true)
@@ -438,4 +445,4 @@ void displayFrameBuffer(void)
438445

439446
//Return the cursor to its original position
440447
SerLCD.setCursor(characterCount % settingLCDwidth, characterCount / settingLCDwidth);
441-
}
448+
}

0 commit comments

Comments
 (0)